当前位置: 首页>>代码示例>>C#>>正文


C# SerializationInfo.GetBoolean方法代码示例

本文整理汇总了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);
        }
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:29,代码来源:Lookup.cs

示例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));
    }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:32,代码来源:SimpleShapeBase.Serialization.cs

示例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
         {
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:29,代码来源:WebProxy.cs

示例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");
    }
开发者ID:thunder176,项目名称:HeuristicLab,代码行数:32,代码来源:ShapeBase.Serialization.cs

示例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");
 }
开发者ID:erpframework,项目名称:spiderframework,代码行数:12,代码来源:UrlExtractor.cs

示例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);
        }
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:27,代码来源:LookupValue.cs

示例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;
		}
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:27,代码来源:DiagramSerialize.cs

示例8: Shape

 protected Shape(SerializationInfo Info, StreamingContext Context)
     : base(Info, Context)
 {
     Utils.Deserializing();
     this._IsSelected = Info.GetBoolean("IsSelected");
     this._IsVisible = Info.GetBoolean("IsVisible");
 }
开发者ID:Shayan-To,项目名称:OpenMesh,代码行数:7,代码来源:Shape.cs

示例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");
 }
开发者ID:erpframework,项目名称:spiderframework,代码行数:7,代码来源:HtmlUrlExtractor.cs

示例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;
     }
 }
开发者ID:xiaoyj,项目名称:Space,代码行数:25,代码来源:GeoDisplayPolygonRegion.cs

示例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());
 }
开发者ID:elemk0vv,项目名称:roslyn-1,代码行数:28,代码来源:CSharpSerializableCompilationOptions.cs

示例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");
 }
开发者ID:computmaxer,项目名称:TotalDMXControl,代码行数:7,代码来源:AttributePointSetting.cs

示例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());
 }
开发者ID:jerriclynsjohn,项目名称:roslyn,代码行数:33,代码来源:CSharpSerializableCompilationOptions.cs

示例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));
 }
开发者ID:deveel,项目名称:deveeldb,代码行数:8,代码来源:DeclareVariableStatement.cs

示例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");
 }
开发者ID:xamele0n,项目名称:Simple.Owin,代码行数:9,代码来源:RangeException.cs


注:本文中的System.Runtime.Serialization.SerializationInfo.GetBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。