Loads an object from a string in a specified format, with option bits that cause fields to be selectively persisted.
Namespace: Cognex.VisionProAssembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 93.1.0.0
[ObsoleteAttribute("This method is deprecated.", false)]
public static Object LoadObjectFromString(
string source,
Type formatterType,
CogSerializationOptionsConstants optionBits,
StreamingContextStates contextStates
)[ObsoleteAttribute("This method is deprecated.", false)]
public static Object LoadObjectFromString(
string source,
Type formatterType,
CogSerializationOptionsConstants optionBits,
StreamingContextStates contextStates
)<ObsoleteAttribute("This method is deprecated.", false)>
Public Shared Function LoadObjectFromString (
source As String,
formatterType As Type,
optionBits As CogSerializationOptionsConstants,
contextStates As StreamingContextStates
) As Object<ObsoleteAttribute("This method is deprecated.", false)>
Public Shared Function LoadObjectFromString (
source As String,
formatterType As Type,
optionBits As CogSerializationOptionsConstants,
contextStates As StreamingContextStates
) As Objectpublic:
[ObsoleteAttribute(L"This method is deprecated.", false)]
static Object^ LoadObjectFromString(
String^ source,
Type^ formatterType,
CogSerializationOptionsConstants optionBits,
StreamingContextStates contextStates
)
public:
[ObsoleteAttribute(L"This method is deprecated.", false)]
static Object^ LoadObjectFromString(
String^ source,
Type^ formatterType,
CogSerializationOptionsConstants optionBits,
StreamingContextStates contextStates
)
Parameters
- source
- Type: System String
The input string.
- formatterType
- Type: System Type
The type of formatter to use. Use a BinaryFormatter to save the object as binary data. For example, to use the BinaryFormatter in C# you would type: typeof(System.Runtime.Serialization.Formatters.Binary.BinaryFormatter)
- optionBits
- Type: Cognex.VisionPro CogSerializationOptionsConstants
The option bits specifying what should be persisted.
- contextStates
- Type: System.Runtime.Serialization StreamingContextStates
Context states indicate the intended purpose of persisting. These flags are ignored on load by VisionPro .NET objects.
Return Value
Type:
ObjectThe loaded object.
To learn more about persisting objects, see
Persistence in VisionPro