本文整理匯總了C#中System.Runtime.Serialization.SerializationInfo.GetByteArray方法的典型用法代碼示例。如果您正苦於以下問題:C# SerializationInfo.GetByteArray方法的具體用法?C# SerializationInfo.GetByteArray怎麽用?C# SerializationInfo.GetByteArray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Runtime.Serialization.SerializationInfo
的用法示例。
在下文中一共展示了SerializationInfo.GetByteArray方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ModuleData
private ModuleData(SerializationInfo info, StreamingContext context)
{
_moduleData.Id = (ModuleDataId)info.GetValue(nameof(Id), typeof(ModuleDataId));
_moduleData.Kind = (OutputKind)info.GetInt32(nameof(Kind));
_moduleData.Image = info.GetByteArray(nameof(Image));
_moduleData.Pdb = info.GetByteArray(nameof(Pdb));
_moduleData.InMemoryModule = info.GetBoolean(nameof(InMemoryModule));
}
示例2: ModuleData
private ModuleData(SerializationInfo info, StreamingContext context)
{
//public readonly string FullName;
this.FullName = info.GetString("FullName");
//public readonly OutputKind Kind;
this.Kind = (OutputKind)info.GetInt32("kind");
//public readonly ImmutableArray<byte> Image;
this.Image = info.GetByteArray("Image");
//public readonly ImmutableArray<byte> PDB;
this.PDB = info.GetByteArray("PDB");
//public readonly bool InMemoryModule;
this.InMemoryModule = info.GetBoolean("InMemoryModule");
//private Guid? mvid;
this.mvid = (Guid?)info.GetValue("mvid", typeof(Guid?));
}