Show / Hide Table of Contents

Class SettingInfo

Encapsulates data for a setting item.

Inheritance
System.Object
SettingInfo
Implements
System.Runtime.Serialization.ISerializable
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Settings
Assembly: Sartorius.SAF.dll
Syntax
[Serializable]
public class SettingInfo : ISerializable

Constructors

View Source

SettingInfo(SettingScope)

Creates a new instance of the SettingInfo class for the specified SettingScope.

Declaration
public SettingInfo(SettingScope scope)
Parameters
Type Name Description
SettingScope scope

The SettingScope.

View Source

SettingInfo(SerializationInfo, StreamingContext)

Creates a new instance of the SettingInfo class from the specified serialization info.

Declaration
protected SettingInfo(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info

The System.Runtime.Serialization.SerializationInfo.

System.Runtime.Serialization.StreamingContext context

The System.Runtime.Serialization.StreamingContext.

Properties

View Source

Application

Gets the name of the application.

Declaration
public string Application { get; }
Property Value
Type Description
System.String
View Source

ContentBinary

Gets or sets the content as binary blob.

Declaration
public byte[] ContentBinary { get; set; }
Property Value
Type Description
System.Byte[]
View Source

CustomSerializationBinder

Gets or sets the custom serialization binder.

Declaration
public SerializationBinder CustomSerializationBinder { get; set; }
Property Value
Type Description
System.Runtime.Serialization.SerializationBinder

The custom serialization binder.

View Source

Scope

Gets the scope of the setting.

Declaration
public SettingScope Scope { get; }
Property Value
Type Description
SettingScope
View Source

SettingID

Gets or sets the id of the setting item.

Declaration
public string SettingID { get; set; }
Property Value
Type Description
System.String
View Source

User

Gets or sets the user name.

Declaration
public string User { get; set; }
Property Value
Type Description
System.String

Methods

View Source

GetContent<T>()

Gets the content as the specified type.

Declaration
public T GetContent<T>()
    where T : class
Returns
Type Description
T

The settings content as the specified type or null if the content is not of the specified type.

Type Parameters
Name Description
T

The type of the content.

Remarks

This method does not throw a deserialization exception if the content cannot be deserialized (e.g due to a version mismatch). This is required for app settings compatibility . In some cases the new version of an application doesn't support the types that were used in a previous version or the type was changed and is no longer binary compatible for deserialization. (e.g extended with new members).

View Source

GetObjectData(SerializationInfo, StreamingContext)

Declaration
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info
System.Runtime.Serialization.StreamingContext context
View Source

SetContent(Object)

Sets the content of the setting item.

Declaration
public void SetContent(object content)
Parameters
Type Name Description
System.Object content

The content of the setting.

Remarks

In case of a serialization exception for content of type of Dictionary(string,object) try to remove the items that cannot be serialized. See also the remarks for GetContent<T>().

Implements

System.Runtime.Serialization.ISerializable

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX