本文整理汇总了C#中System.Runtime.Serialization.SerializationInfo.GetBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationInfo.GetBoolean方法的具体用法?C# SerializationInfo.GetBoolean怎么用?C# SerializationInfo.GetBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Runtime.Serialization.SerializationInfo
的用法示例。
在下文中一共展示了SerializationInfo.GetBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Lookup
/// <exclude/>
public Lookup(SerializationInfo serializationInfo, StreamingContext streamingContext)
{
int version = 0;
if (SerializationVersionExists)
{
try
{
version = serializationInfo.GetInt32("SerializationVersion");
}
catch (SerializationException)
{
// ignore
SerializationVersionExists = false;
}
}
_alias = serializationInfo.GetString("Alias");
_aliasPlural = serializationInfo.GetString("AliasPlural");
_enabled = serializationInfo.GetBoolean("Enabled");
_isUserDefined = serializationInfo.GetBoolean("IsUserDefined");
_name = serializationInfo.GetString("Name");
_userOptions = (List<IUserOption>)serializationInfo.GetValue("UserOptions", ModelTypes.UserOptionList);
_description = serializationInfo.GetString("Description");
_backingObject = (ScriptObject)serializationInfo.GetValue("BackingObject", ModelTypes.ScriptObject);
_idColumn = (Column)serializationInfo.GetValue("IdColumn", ModelTypes.Column);
_nameColumn = (Column)serializationInfo.GetValue("NameColumn", ModelTypes.Column);
_LookupValues = (List<LookupValue>)serializationInfo.GetValue("LookupValues", ModelTypes.LookupValueList);
}
示例2: SimpleShapeBase
// -------------------------------------------------------------------
/// <summary>
/// Deserialization constructor
/// </summary>
/// <param name="info">The info.</param>
/// <param name="context">The context.</param>
// -------------------------------------------------------------------
protected SimpleShapeBase(
SerializationInfo info,
StreamingContext context)
: base(info, context) {
if (Tracing.BinaryDeserializationSwitch.Enabled) {
Trace.WriteLine(
"Deserializing the fields of 'SimpleShapeBase'.");
}
double version = info.GetDouble("SimpleShapeBaseVersion");
mText = info.GetString("Text");
mAutoSize = info.GetBoolean("AutoSize");
mAllowTextEditing = info.GetBoolean("AllowTextEditing");
mEditTextClicks = info.GetInt32("EditTextClicks");
mTextArea = (Rectangle)info.GetValue(
"TextArea",
typeof(Rectangle));
mTextStyle = (ITextStyle)info.GetValue(
"TextStyle",
typeof(ITextStyle));
}
示例3: WebProxy
protected WebProxy(SerializationInfo serializationInfo, StreamingContext streamingContext)
{
bool boolean = false;
try
{
boolean = serializationInfo.GetBoolean("_UseRegistry");
}
catch
{
}
if (boolean)
{
ExceptionHelper.WebPermissionUnrestricted.Demand();
this.UnsafeUpdateFromRegistry();
}
else
{
this._ProxyAddress = (Uri) serializationInfo.GetValue("_ProxyAddress", typeof(Uri));
this._BypassOnLocal = serializationInfo.GetBoolean("_BypassOnLocal");
this._BypassList = (ArrayList) serializationInfo.GetValue("_BypassList", typeof(ArrayList));
try
{
this.UseDefaultCredentials = serializationInfo.GetBoolean("_UseDefaultCredentials");
}
catch
{
}
}
}
示例4: ShapeBase
// -------------------------------------------------------------------
/// <summary>
/// Deserialization constructor
/// </summary>
/// <param name="info">The info.</param>
/// <param name="context">The context.</param>
// -------------------------------------------------------------------
protected ShapeBase(
SerializationInfo info,
StreamingContext context)
: base(info, context) {
if (Tracing.BinaryDeserializationSwitch.Enabled) {
Trace.WriteLine("Deserializing the fields of 'ShapeBase'.");
}
double version = info.GetDouble("ShapeBaseVersion");
mConnectors = new CollectionBase<IConnector>();
//transform to the new bounding rectangle
Transform(
(Rectangle)info.GetValue("Rectangle", typeof(Rectangle))
);
this.mConnectors = info.GetValue(
"Connectors",
typeof(CollectionBase<IConnector>)) as
CollectionBase<IConnector>;
mShowConnectors = info.GetBoolean("ShowConnectors");
mIsFixed = info.GetBoolean("IsFixed");
}
示例5: UrlExtractor
/// <summary>
/// 反序列化
/// </summary>
/// <param name="info">SerializationInfo</param>
/// <param name="context">StreamingContext</param>
protected UrlExtractor(SerializationInfo info,StreamingContext context)
{
this.rulers = info.GetValue("rulers", typeof(UrlRulerCollection)) as UrlRulerCollection;
this.onlySameDomain = info.GetBoolean("onlySameDomain");
this.onlySameHost = info.GetBoolean("onlySameHost");
this.extractFinal = info.GetBoolean("extractFinal");
}
示例6: LookupValue
/// <exclude/>
public LookupValue(SerializationInfo serializationInfo, StreamingContext streamingContext)
{
int version = 0;
if (SerializationVersionExists)
{
try
{
version = serializationInfo.GetInt32("SerializationVersion");
}
catch (SerializationException)
{
// ignore
SerializationVersionExists = false;
}
}
_alias = serializationInfo.GetString("Alias");
_aliasPlural = serializationInfo.GetString("AliasPlural");
_enabled = serializationInfo.GetBoolean("Enabled");
_isUserDefined = serializationInfo.GetBoolean("IsUserDefined");
_name = serializationInfo.GetString("Name");
_userOptions = (List<IUserOption>)serializationInfo.GetValue("UserOptions", ModelTypes.UserOptionList);
_id = serializationInfo.GetValue("Id", ModelTypes.Object);
_description = serializationInfo.GetString("Description");
_Parent = (Lookup)serializationInfo.GetValue("Parent", ModelTypes.Lookup);
}
示例7: SetObjectData
public virtual object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
{
Diagram diagram = (Diagram) obj;
diagram.SuspendEvents = true;
diagram.Suspend();
mShapes = (Elements) info.GetValue("Shapes",typeof(Elements));
mLines = (Elements) info.GetValue("Lines",typeof(Elements));
mLayers = (Layers) info.GetValue("Layers",typeof(Layers));
//Diagram is created without a constructor, so need to do some initialization
diagram.SetRender(new Render());
diagram.DiagramSize = Serialize.GetSize(info.GetString("DiagramSize"));
diagram.Zoom = info.GetSingle("Zoom");
diagram.ShowTooltips = info.GetBoolean("ShowTooltips");
diagram.Paged = info.GetBoolean("Paged");
diagram.CheckBounds = info.GetBoolean("CheckBounds");
diagram.Margin = (Margin) info.GetValue("Margin",typeof(Margin));
diagram.WorkspaceColor = Color.FromArgb(Convert.ToInt32(info.GetString("WorkspaceColor")));
if (Serialize.Contains(info,"Animator", typeof(Animator))) diagram.Animator = (Animator) info.GetValue("Animator", typeof(Animator));
diagram.Resume();
diagram.SuspendEvents = false;
return diagram;
}
示例8: Shape
protected Shape(SerializationInfo Info, StreamingContext Context)
: base(Info, Context)
{
Utils.Deserializing();
this._IsSelected = Info.GetBoolean("IsSelected");
this._IsVisible = Info.GetBoolean("IsVisible");
}
示例9: HtmlUrlExtractor
private HtmlUrlExtractor(SerializationInfo info, StreamingContext context)
: base(info, context)
{
this.TagA = info.GetBoolean("tagA");
this.TagImg = info.GetBoolean("tagImg");
this.imgTypes = info.GetString("imgTypes");
}
示例10: GeoDisplayPolygonRegion
private GeoDisplayPolygonRegion(SerializationInfo info, StreamingContext context)
{
if (ProjectSingleton.Instance.OpenV3R5ProjectFile)
{
base.m_Comments = info.GetString("m_Remark");
this.m_Region = new GeoPolygonRegion();
this.m_Region.ID = info.GetInt32("m_ID");
this.m_Region.Name = info.GetString("m_Name");
this.m_Region.SelectedForPrint = info.GetBoolean("m_SelectedForPrint");
this.m_Region.GeoPolygonList = info.GetValue("m_GeoPolygonList", typeof(List<GeoPolygon>)) as List<GeoPolygon>;
GeoPolygonStyle style = GeoEntityStyleFactory.GenerateDefaultPolygonStyle();
style.LineWidth = info.GetSingle("m_LineWidth");
style.LineDashStyle = (DashStyle) info.GetValue("m_LineType", typeof(DashStyle));
style.Color = (Color) info.GetValue("m_LineColor", typeof(Color));
style.FillColor = (Color) info.GetValue("m_RegionColor", typeof(Color));
style.Visible = info.GetBoolean("m_Visible");
style.IsShowLabel = info.GetBoolean("m_IsShownPolygonName");
base.m_Style = style;
}
else
{
base.BuildBaseClassFromV3R6(info, context);
this.m_Region = info.GetValue("m_Region", typeof(GeoPolygonRegion)) as GeoPolygonRegion;
}
}
示例11: CSharpSerializableCompilationOptions
private CSharpSerializableCompilationOptions(SerializationInfo info, StreamingContext context)
{
_options = new CSharpCompilationOptions(
outputKind: (OutputKind)info.GetInt32(OutputKindString),
moduleName: info.GetString(ModuleNameString),
mainTypeName: info.GetString(MainTypeNameString),
scriptClassName: info.GetString(ScriptClassNameString),
usings: (string[])info.GetValue(UsingsString, typeof(string[])),
cryptoKeyContainer: info.GetString(CryptoKeyContainerString),
cryptoKeyFile: info.GetString(CryptoKeyFileString),
delaySign: (bool?)info.GetValue(DelaySignString, typeof(bool?)),
optimizationLevel: (OptimizationLevel)info.GetInt32(OptimizeString),
checkOverflow: info.GetBoolean(CheckOverflowString),
allowUnsafe: info.GetBoolean(AllowUnsafeString),
platform: (Platform)info.GetInt32(PlatformString),
generalDiagnosticOption: (ReportDiagnostic)info.GetInt32(GeneralDiagnosticOptionString),
warningLevel: info.GetInt32(WarningLevelString),
specificDiagnosticOptions: ((Dictionary<string, ReportDiagnostic>)info.GetValue(SpecificDiagnosticOptionsString, typeof(Dictionary<string, ReportDiagnostic>))).ToImmutableDictionary(),
concurrentBuild: info.GetBoolean(ConcurrentBuildString),
extendedCustomDebugInformation: info.GetBoolean(ExtendedCustomDebugInformationString),
xmlReferenceResolver: XmlFileResolver.Default,
sourceReferenceResolver: SourceFileResolver.Default,
metadataReferenceResolver: new AssemblyReferenceResolver(MetadataFileReferenceResolver.Default, MetadataFileReferenceProvider.Default),
assemblyIdentityComparer: DesktopAssemblyIdentityComparer.Default,
strongNameProvider: new DesktopStrongNameProvider(),
metadataImportOptions: (MetadataImportOptions)info.GetByte(MetadataImportOptionsString),
features: ((string[])info.GetValue(FeaturesString, typeof(string[]))).AsImmutable());
}
示例12: AttributePointSetting
public AttributePointSetting(SerializationInfo info, StreamingContext ctxt)
{
this.Attribute = (FixtureAttribute)info.GetValue("Attribute", typeof(FixtureAttribute));
_value = info.GetInt32("_value");
this.Snap = info.GetBoolean("Snap");
_active = info.GetBoolean("_active");
}
示例13: CSharpSerializableCompilationOptions
private CSharpSerializableCompilationOptions(SerializationInfo info, StreamingContext context)
{
this.options = new CSharpCompilationOptions(
outputKind: (OutputKind)info.GetInt32(OutputKindString),
moduleName: info.GetString(ModuleNameString),
mainTypeName: info.GetString(MainTypeNameString),
scriptClassName: info.GetString(ScriptClassNameString),
usings: (string[])info.GetValue(UsingsString, typeof(string[])),
cryptoKeyContainer: info.GetString(CryptoKeyContainerString),
cryptoKeyFile: info.GetString(CryptoKeyFileString),
delaySign: (bool?)info.GetValue(DelaySignString, typeof(bool?)),
optimizationLevel: (OptimizationLevel)info.GetInt32(OptimizeString),
checkOverflow: info.GetBoolean(CheckOverflowString),
allowUnsafe: info.GetBoolean(AllowUnsafeString),
fileAlignment: info.GetInt32(FileAlignmentString),
baseAddress: info.GetUInt64(BaseAddressString),
platform: (Platform)info.GetInt32(PlatformString),
generalDiagnosticOption: (ReportDiagnostic)info.GetInt32(GeneralDiagnosticOptionString),
warningLevel: info.GetInt32(WarningLevelString),
specificDiagnosticOptions: ((Dictionary<string, ReportDiagnostic>)info.GetValue(SpecificDiagnosticOptionsString, typeof(Dictionary<string, ReportDiagnostic>))).ToImmutableDictionary(),
highEntropyVirtualAddressSpace: info.GetBoolean(HighEntropyVirtualAddressSpaceString),
subsystemVersion: SubsystemVersion.Create(info.GetInt32(SubsystemVersionMajorString), info.GetInt32(SubsystemVersionMinorString)),
runtimeMetadataVersion: info.GetString(RuntimeMetadataVersionString),
concurrentBuild: info.GetBoolean(ConcurrentBuildString),
xmlReferenceResolver: XmlFileResolver.Default,
sourceReferenceResolver: SourceFileResolver.Default,
metadataReferenceResolver: MetadataFileReferenceResolver.Default,
metadataReferenceProvider: MetadataFileReferenceProvider.Default,
assemblyIdentityComparer: DesktopAssemblyIdentityComparer.Default,
strongNameProvider: new DesktopStrongNameProvider(),
metadataImportOptions: (MetadataImportOptions)info.GetByte(MetadataImportOptionsString),
features: ((string[])info.GetValue(FeaturesString, typeof(string[]))).AsImmutable());
}
示例14: DeclareVariableStatement
private DeclareVariableStatement(SerializationInfo info, StreamingContext context)
{
VariableName = info.GetString("Variable");
VariableType = (SqlType) info.GetValue("Type", typeof (SqlType));
IsConstant = info.GetBoolean("Constant");
IsNotNull = info.GetBoolean("NotNull");
DefaultExpression = (SqlExpression) info.GetValue("Default", typeof (SqlExpression));
}
示例15: RangeException
/// <inheritdoc/>
protected RangeException(SerializationInfo info, StreamingContext context)
: base(info, context) {
_actual = info.GetString("Actual");
_low = info.GetString("Low");
_lowInclusive = info.GetBoolean("LowInclusive");
_high = info.GetString("High");
_highInclusive = info.GetBoolean("HighInclusive");
}