Пример #1
0
 /// <summary>
 /// Construtor usado para deserializar os dados.
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 protected Export(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     this.Type                 = (TypeName)info.GetValue("Type", typeof(TypeName));
     this.ContractName         = info.GetString("ContractName");
     this.ContractType         = (TypeName)info.GetValue("ContractType", typeof(TypeName));
     this.ImportingConstructor = info.GetBoolean("ImportingConstructor");
     this.CreationPolicy       = (CreationPolicy)info.GetInt32("CreationPolicy");
     this.UseDispatcher        = info.GetBoolean("UseDispatcher");
     this.UIContext            = info.GetString("UIContext");
     this.Metadata             = (Dictionary <string, object>)info.GetValue("Metadata", typeof(Dictionary <string, object>));
 }
Пример #2
0
 /// <summary>
 /// AADataの逆シリアル化に用いるクラスです
 /// </summary>
 /// <param name="info">シリアル化の基礎データ</param>
 /// <param name="context">シリアル化の基礎のStream</param>
 protected AAData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     this.Content   = info.GetString("Content");
     this.ViewCount = info.GetInt32("ViewCount");
     this.Favorite  = info.GetBoolean("Favorite");
     this.Tag       = (string[])info.GetValue("Tag", typeof(string[]));
 }
Пример #3
0
        protected Layer(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            if (info == null)
            {
                throw new System.ArgumentNullException("info");
            }

            _objects = (VObjectCollection)info.GetValue(SerializationNames.LayerObjects, typeof(VObjectCollection));
            _objects.VObjectAdding   += new VObjectEventHandler(ObjectAddingHandler);
            _objects.VObjectAdded    += new VObjectEventHandler(ObjectAddedHandler);
            _objects.VObjectRemoving += new VObjectEventHandler(ObjectRemovingHandler);
            _objects.VObjectRemoved  += new VObjectEventHandler(ObjectRemovedHandler);

            _name    = info.GetString(SerializationNames.Name);
            _locked  = info.GetBoolean(SerializationNames.Locked);
            _visible = info.GetBoolean(SerializationNames.LayerVisible);
        }
Пример #4
0
 public virtual object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector)
 {
     _position = (PointF)info.GetValue("Position", typeof(PointF));
     _bounds   = (RectangleF)info.GetValue("Bounds", typeof(RectangleF));
     _rotation = info.GetSingle("Rotation");
     _autoSize = info.GetBoolean("AutoSize");
     return(this);
 }
Пример #5
0
            /// <summary>
            /// Deserializes the axis style (version 0).
            /// </summary>
            /// <param name="obj">The empty axis object to deserialize into.</param>
            /// <param name="info">The serialization info.</param>
            /// <param name="context">The streaming context.</param>
            /// <param name="selector">The deserialization surrogate selector.</param>
            /// <returns>The deserialized linear axis.</returns>
            public object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector)
            {
                AxisLineStyle s = (AxisLineStyle)obj;

                s._axisPen      = (PenX)info.GetValue("AxisPen", typeof(PenX));
                s._majorTickPen = (PenX)info.GetValue("MajorPen", typeof(PenX));
                s._minorTickPen = (PenX)info.GetValue("MinorPen", typeof(PenX));

                s._majorTickLength         = (float)info.GetSingle("MajorLength");
                s._minorTickLength         = (float)info.GetSingle("MinorLength");
                s._showFirstUpMajorTicks   = (bool)info.GetBoolean("MajorRight");
                s._showFirstDownMajorTicks = (bool)info.GetBoolean("MajorLeft");
                s._showFirstUpMinorTicks   = (bool)info.GetBoolean("MinorRight");
                s._showFirstDownMinorTicks = (bool)info.GetBoolean("MinorLeft");
                s._axisPosition            = (Calc.RelativeOrAbsoluteValue)info.GetValue("AxisPosition", typeof(Calc.RelativeOrAbsoluteValue));

                return(s);
            }
Пример #6
0
 /// <summary>
 /// Construtor usado para deserializar os dados.
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 protected CommandExecutionInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     _commandText = info.GetString("CommandText");
     _commandType = (System.Data.CommandType)info.GetInt16("CommandType");
     _elapsedTime = new TimeSpan(info.GetInt64("ElapsedTime"));
     _timeout     = info.GetInt32("Timeout");
     _success     = info.GetBoolean("Success");
     _error       = (Exception)info.GetValue("Error", typeof(Exception));
     _rowsAffects = info.GetInt32("RowsAffects");
 }
Пример #7
0
        public void LoadFromStream(System.Runtime.Serialization.SerializationInfo info, int orderNumber)
        {
            _graphicsList = new GraphicsList();

            _name = info.GetString(
                String.Format(CultureInfo.InvariantCulture,
                              "{0}{1}",
                              entryLayerName, orderNumber));

            _visible = info.GetBoolean(
                String.Format(CultureInfo.InvariantCulture,
                              "{0}{1}",
                              entryLayerVisible, orderNumber));

            _active = info.GetBoolean(
                String.Format(CultureInfo.InvariantCulture,
                              "{0}{1}",
                              entryLayerActive, orderNumber));

            int n = info.GetInt32(
                String.Format(CultureInfo.InvariantCulture,
                              "{0}{1}",
                              entryGraphicsCount, orderNumber));

            string typeName;
            object drawObject;

            for (int i = 0; i < n; i++)
            {
                typeName = info.GetString(
                    String.Format(CultureInfo.InvariantCulture,
                                  "{0}{1}-{2}",
                                  entryObjectType, orderNumber, i));

                drawObject = Assembly.GetExecutingAssembly().CreateInstance(typeName);

                ((DrawObject)drawObject).LoadFromStream(info, orderNumber, i);

                _graphicsList.Add((DrawObject)drawObject);
            }
        }
Пример #8
0
        protected ImageVObject(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
            : base(info, context)
        {
            if (info == null)
            {
                throw new System.ArgumentNullException("info");
            }

            _image             = (Aurigma.GraphicsMill.Bitmap)info.GetValue(SerializationNames.ImageBitmap, typeof(Aurigma.GraphicsMill.Bitmap));
            _rect              = (RectangleVObject)info.GetValue(SerializationNames.ImageRectangle, typeof(RectangleVObject));
            _scaleToActualSize = info.GetBoolean(SerializationNames.ImageScaleToActual);
        }
 /// <summary>
 /// Constructs a new instance of the HttpWebRequestResponseData class with serialized data.
 /// </summary>
 /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data.</param>
 /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
 /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
 /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
 protected HttpWebRequestResponseData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     if (info != null)
     {
         this._headerNames        = (string[])info.GetValue("_headerNames", typeof(string[]));
         this._headerNamesSet     = (HashSet <string>)info.GetValue("_headerNamesSet", typeof(HashSet <string>));
         this._headers            = (Dictionary <string, string>)info.GetValue("_headers", typeof(Dictionary <string, string>));
         this.StatusCode          = (HttpStatusCode)info.GetValue("StatusCode", typeof(HttpStatusCode));
         this.IsSuccessStatusCode = info.GetBoolean("IsSuccessStatusCode");
         this.ContentType         = info.GetString("ContentType");
         this.ContentLength       = info.GetInt64("ContentLength");
     }
 }
Пример #10
0
        protected VObject(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
            : this()
        {
            if (info == null)
            {
                throw new System.ArgumentNullException("info");
            }

            _name   = info.GetString(SerializationNames.Name);
            _locked = info.GetBoolean(SerializationNames.Locked);

            _genericControlPointsProvider.SetObjectData(info, context);
        }
Пример #11
0
 /// <summary>
 /// Construtor usado na serialização dos dados.
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 protected ProfileInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     _profileId        = info.GetInt32("ProfileId");
     _isAnonymous      = info.GetBoolean("IsAnonymous");
     _lastActivityDate = (DateTimeOffset)info.GetValue("LastActivityDate", typeof(DateTimeOffset));
     _lastUpdatedDate  = (DateTimeOffset)info.GetValue("LastUpdatedDate", typeof(DateTimeOffset));
     _userName         = info.GetString("UserName");
     _fullName         = info.GetString("FullName");
     _searchMode       = (ProfileSearchMode)info.GetInt32("SearchMode");
     _source           = (IAuthenticationSource)info.GetValue("Source", typeof(AuthenticationSource));
     _markGroupId      = (int?)info.GetValue("MarkGroupId", typeof(int?));
     _sellerTreeId     = (int?)info.GetValue("SellerTreeId", typeof(int?));
     _intermediateId   = (int?)info.GetValue("IntermediateId", typeof(int?));
 }
Пример #12
0
        protected FreehandVObject(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
            : base(info, context)
        {
            if (info == null)
            {
                throw new System.ArgumentNullException("info");
            }

            _points    = BinarySerializer.DeserializePointFArray((byte[])info.GetValue(SerializationNames.FreehandPoints, typeof(byte[])));
            _closePath = info.GetBoolean(SerializationNames.FreehandClosePath);
            _fillMode  = (System.Drawing.Drawing2D.FillMode)info.GetInt32(SerializationNames.FreehandFillMode);

            UpdatePath();
        }
Пример #13
0
        protected RecognitionException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            if (info == null)
            {
                throw new ArgumentNullException("info");
            }

            _index = info.GetInt32("Index");
            _c     = info.GetInt32("C");
            _line  = info.GetInt32("Line");
            _charPositionInLine  = info.GetInt32("CharPositionInLine");
            _approximateLineInfo = info.GetBoolean("ApproximateLineInfo");
        }
Пример #14
0
        /// <summary> Deserialize the page.
        /// For details see <code>writeObject()</code>.
        /// </summary>
        /// <param name="in">The object stream to decode.
        /// </param>
        /// <exception cref="IOException">If there is a deserialization problem with
        /// the stream.
        /// </exception>
        /// <exception cref="ClassNotFoundException">If the deserialized class can't be
        /// located with the current classpath and class loader.
        /// </exception>
        protected Page(System.Runtime.Serialization.SerializationInfo in_Renamed, System.Runtime.Serialization.StreamingContext context)
        {
            bool fromurl;
            int  offset;

            System.String href;
            System.Uri    url;
            Cursor        cursor;

            fromurl = in_Renamed.GetBoolean("Winista.Text.Htmlparser.Lex.Pagedata1");
            if (fromurl)
            {
                offset = in_Renamed.GetInt32("Winista.Text.Htmlparser.Lex.Pagedata2");
                href   = ((System.String)in_Renamed.GetValue("Winista.Text.Htmlparser.Lex.Pagedata3", typeof(System.String)));
                Support.SupportMisc.DefaultReadObject(in_Renamed, context, this);
                // open the URL
                if (null != Url)
                {
                    url = new System.Uri(Url);
                    try
                    {
                        //Connection = (System.Net.HttpWebRequest) System.Net.WebRequest.Create(url);
                    }
                    catch (ParserException pe)
                    {
                        throw new System.IO.IOException(pe.Message);
                    }
                }
                cursor = new Cursor(this, 0);
                for (int i = 0; i < offset; i++)
                {
                    try
                    {
                        GetCharacter(cursor);
                    }
                    catch (ParserException pe)
                    {
                        throw new System.IO.IOException(pe.Message);
                    }
                }
                Url = href;
            }
            else
            {
                href = ((System.String)in_Renamed.GetValue("Winista.Text.Htmlparser.Lex.Pagedata4", typeof(System.String)));
                Support.SupportMisc.DefaultReadObject(in_Renamed, context, this);
                Url = href;
            }
        }
Пример #15
0
        public object SetObjectData(
            object obj,
            System.Runtime.Serialization.SerializationInfo info,
            System.Runtime.Serialization.StreamingContext context,
            System.Runtime.Serialization.ISurrogateSelector selector)
        {
            System.Diagnostics.Stopwatch stopWatch = null;
            bool isNull = info.GetBoolean(NULL_INDICATOR_STRING);

            if (!isNull)
            {
                stopWatch = obj as System.Diagnostics.Stopwatch;
                // read other values and set via reflection
            }

            return(stopWatch);
        }
Пример #16
0
        internal XmlDocumentSerializationProxy(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext c)
        {
            if (info.GetBoolean("isNull"))
            {
                return;
            }
            string @string = info.GetString("typeName");
            string string2 = info.GetString("val");

            System.Type type        = System.Type.GetType(@string);
            XmlDocument xmlDocument = (XmlDocument)System.Activator.CreateInstance(type);

            if (string2.Trim().Length > 0)
            {
                xmlDocument.LoadXml(string2);
            }
            this._doc = xmlDocument;
        }
Пример #17
0
        internal void SetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            if (info == null)
            {
                throw new System.ArgumentNullException("info");
            }

            _controlPointsEnabled = info.GetBoolean(SerializationNames.TextAreaPointsEnabled);

            try
            {
                _controlPointPrototype = (ControlPoint)info.GetValue(SerializationNames.TextAreaPointPrototype, typeof(ControlPoint));
                RecreateControlPoints();
            }
            catch (System.Runtime.Serialization.SerializationException)
            {
                // Prototype wasn't saved during serialization.
            }
        }
Пример #18
0
        /// <summary>
        /// Creates an instance of the UnitOperationWrapper unit operation wrapping the unit operation.
        /// </summary>
        /// <remarks>
        /// This constructor creates a new instance of a <see craf = "UnitOperationWrapper"/> from a serialized
        /// instance.
        /// </remarks>
        /// <param name="info">The serialization data for the object.</param>
        /// <param name="context">The serialization context of the serialized stream.</param>
        public UnitOperationWrapper(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            bool isCom = info.GetBoolean("isCOM");

            if (isCom)
            {
                m_CLSID     = new System.Guid(info.GetString("CLSID"));
                this.p_Unit = Activator.CreateInstance(Type.GetTypeFromCLSID(m_CLSID));
            }
            else
            {
                Type type = (Type)info.GetValue("Unit Type", typeof(Type));
            }
            this.Initialize();
            ICapeIdentification p_Id = (ICapeIdentification)p_Unit;

            p_Id.ComponentName = info.GetString("Unit Name");
            p_Id.ComponentName = info.GetString("Unit Description");
            //this.SimulationContext = (ICapeSimulationContext)info.GetValue("Simulation Context", typeof(object));
            object[]        m_ParameterValues = (object[])info.GetValue("Parameter Values", typeof(object[]));
            CapeParamMode[] m_ParameterModes  = (CapeParamMode[])info.GetValue("Parameter Modes", typeof(CapeParamMode[]));
            int             i = 0;

            foreach (ICapeParameter parameter in this.Parameters)
            {
                parameter.value = m_ParameterValues[i];
                parameter.Mode  = m_ParameterModes[i];
                i++;
            }
            object[] portConnections = (object[])info.GetValue("PortConnections", typeof(object[]));
            i = 0;
            foreach (ICapeUnitPort port in this.Ports)
            {
                if (portConnections[i] != null)
                {
                    this.Ports[i].Connect(portConnections[i]);
                }
                i++;
            }
        }
Пример #19
0
        /// <summary>
        /// Serialization constructor.
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        protected DailyCalendar(
            System.Runtime.Serialization.SerializationInfo info,
            System.Runtime.Serialization.StreamingContext context) : base(info, context)
        {
            int version;

            try
            {
                version = info.GetInt32("version");
            }
            catch
            {
                version = 0;
            }

            switch (version)
            {
            case 0:
            case 1:
                rangeStartingHourOfDay = info.GetInt32("rangeStartingHourOfDay");
                rangeStartingMinute    = info.GetInt32("rangeStartingMinute");
                rangeStartingSecond    = info.GetInt32("rangeStartingSecond");
                rangeStartingMillis    = info.GetInt32("rangeStartingMillis");

                rangeEndingHourOfDay = info.GetInt32("rangeEndingHourOfDay");
                rangeEndingMinute    = info.GetInt32("rangeEndingMinute");
                rangeEndingSecond    = info.GetInt32("rangeEndingSecond");
                rangeEndingMillis    = info.GetInt32("rangeEndingMillis");

                InvertTimeRange = info.GetBoolean("invertTimeRange");
                break;

            default:
                throw new NotSupportedException("Unknown serialization version");
            }
        }
Пример #20
0
        //     SERIALIZATION
        //_________________________________________________________________________________________

#if !SILVERLIGHT
        /// <summary>
        /// Initializes a new instance of the ObjectInstance class with serialized data.
        /// </summary>
        /// <param name="info"> The SerializationInfo that holds the serialized object data about
        /// the exception being thrown. </param>
        /// <param name="context"> The StreamingContext that contains contextual information about
        /// the source or destination. </param>
        private ScriptEngine(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            // Set the DeserializationEnvironment to this script engine.
            ScriptEngine.DeserializationEnvironment = this;

            // Create the initial hidden class schema.  This must be done first.
            this.emptySchema = HiddenClassSchema.CreateEmptySchema();

            // Deserialize the compatibility mode.
            this.compatibilityMode = (CompatibilityMode)info.GetInt32("compatibilityMode");

            // Deserialize the ForceStrictMode flag.
            this.ForceStrictMode = info.GetBoolean("forceStrictMode");

            // Deserialize the built-in objects.
            this.globalObject        = (GlobalObject)info.GetValue("globalObject", typeof(GlobalObject));
            this.arrayConstructor    = (ArrayConstructor)info.GetValue("arrayConstructor", typeof(ArrayConstructor));
            this.booleanConstructor  = (BooleanConstructor)info.GetValue("booleanConstructor", typeof(BooleanConstructor));
            this.dateConstructor     = (DateConstructor)info.GetValue("dateConstructor", typeof(DateConstructor));
            this.functionConstructor = (FunctionConstructor)info.GetValue("functionConstructor", typeof(FunctionConstructor));
            this.jsonObject          = (JSONObject)info.GetValue("jsonObject", typeof(JSONObject));
            this.mathObject          = (MathObject)info.GetValue("mathObject", typeof(MathObject));
            this.numberConstructor   = (NumberConstructor)info.GetValue("numberConstructor", typeof(NumberConstructor));
            this.objectConstructor   = (ObjectConstructor)info.GetValue("objectConstructor", typeof(ObjectConstructor));
            this.regExpConstructor   = (RegExpConstructor)info.GetValue("regExpConstructor", typeof(RegExpConstructor));
            this.stringConstructor   = (StringConstructor)info.GetValue("stringConstructor", typeof(StringConstructor));

            // Deserialize the built-in error objects.
            this.errorConstructor          = (ErrorConstructor)info.GetValue("errorConstructor", typeof(ErrorConstructor));
            this.rangeErrorConstructor     = (ErrorConstructor)info.GetValue("rangeErrorConstructor", typeof(ErrorConstructor));
            this.typeErrorConstructor      = (ErrorConstructor)info.GetValue("typeErrorConstructor", typeof(ErrorConstructor));
            this.syntaxErrorConstructor    = (ErrorConstructor)info.GetValue("syntaxErrorConstructor", typeof(ErrorConstructor));
            this.uriErrorConstructor       = (ErrorConstructor)info.GetValue("uriErrorConstructor", typeof(ErrorConstructor));
            this.evalErrorConstructor      = (ErrorConstructor)info.GetValue("evalErrorConstructor", typeof(ErrorConstructor));
            this.referenceErrorConstructor = (ErrorConstructor)info.GetValue("referenceErrorConstructor", typeof(ErrorConstructor));
        }
Пример #21
0
 protected TableDetail(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     this.TableDetail_ID        = info.GetInt32("TableDetail_ID");
     this.SourceName            = info.GetString("SourceName");
     this.Row_Position          = (int?)info.GetValue("Row_Position", typeof(int?));
     this.Column_Position       = (int?)info.GetValue("Column_Position", typeof(int?));
     this.Column_Span           = (int?)info.GetValue("Column_Span", typeof(int?));
     this.Row_Span              = (int?)info.GetValue("Row_Span", typeof(int?));
     this.Column_Name           = info.GetString("Column_Name");
     this.Column_Header         = info.GetString("Column_Header");
     this.Column_Width          = (int?)info.GetValue("Column_Width", typeof(int?));
     this.Group_Header          = info.GetString("Group_Header");
     this.Datatype              = info.GetString("Datatype");
     this.FormatString          = info.GetString("FormatString");
     this.DefaultValue          = info.GetString("DefaultValue");
     this.DefaultValueDesc      = info.GetString("DefaultValueDesc");
     this.OperatorCode          = (int?)info.GetValue("OperatorCode", typeof(int?));
     this.Sort                  = info.GetBoolean("Sort");
     this.Filter                = info.GetBoolean("Filter");
     this.WrapText              = info.GetBoolean("WrapText");
     this.IsDropdown            = info.GetBoolean("IsDropdown");
     this.IsBoolPic             = info.GetBoolean("IsBoolPic");
     this.IsNumPic              = info.GetBoolean("IsNumPic");
     this.IsCheckbox            = info.GetBoolean("IsCheckbox");
     this.NumOptions            = info.GetString("NumOptions");
     this.NumPics               = info.GetString("NumPics");
     this.CheckName             = info.GetString("CheckName");
     this.RefPrefix             = info.GetString("RefPrefix");
     this.RefColumn             = info.GetString("RefColumn");
     this.RefTableName          = info.GetString("RefTableName");
     this.RefLookupColumn       = info.GetString("RefLookupColumn");
     this.RefDisplayColumn      = info.GetString("RefDisplayColumn");
     this.QuickSort             = info.GetBoolean("QuickSort");
     this.NumericSort           = info.GetBoolean("NumericSort");
     this.QuickFind             = info.GetBoolean("QuickFind");
     this.LinkDiscrepancy       = info.GetBoolean("LinkDiscrepancy");
     this.DiscrepancyColor      = info.GetString("DiscrepancyColor");
     this.ColorControl          = info.GetString("ColorControl");
     this.ColorReference        = info.GetString("ColorReference");
     this.ColorReferenceControl = info.GetString("ColorReferenceControl");
     this.LinkCommand           = info.GetString("LinkCommand");
     this.Required              = info.GetBoolean("Required");
     this.MaxLength             = (int?)info.GetValue("MaxLength", typeof(int?));
     this.Width                 = (int?)info.GetValue("Width", typeof(int?));
     this.DisplayClass          = info.GetString("DisplayClass");
     this.GridSuppress          = (bool?)info.GetValue("GridSuppress", typeof(bool?));
     this.SummaryType           = info.GetString("SummaryType");
     CustomizeDeserializationProcess(info, context);
 }
Пример #22
0
 /// <summary>
 /// Initializes a new instance of the ComponentException class
 /// </summary>
 /// <param name="info">the serialization info required to deserialize the object</param>
 /// <param name="context">the serialization context</param>
 public ComponentException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
     : base(info, context)
 {
     this.critical = info.GetBoolean("critical");
 }
Пример #23
0
 /// <summary>
 /// Construtor usado para deserializar os dados.
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 protected AuthenticationSource(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     Uid      = info.GetInt32("Uid");
     FullName = info.GetString("FullName");
     IsActive = info.GetBoolean("IsActive");
 }
Пример #24
0
 private VerificationResult(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     Description = info.GetString(nameof(Description));
     SubResults  = (IReadOnlyList <VerificationResult>)info.GetValue(nameof(SubResults), typeof(IReadOnlyList <VerificationResult>));
     Success     = info.GetBoolean(nameof(Success));
 }
Пример #25
0
        protected RecognitionException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            if (info == null)
                throw new ArgumentNullException("info");

            _index = info.GetInt32("Index");
            _c = info.GetInt32("C");
            _line = info.GetInt32("Line");
            _charPositionInLine = info.GetInt32("CharPositionInLine");
            _approximateLineInfo = info.GetBoolean("ApproximateLineInfo");
        }
Пример #26
0
 protected ControlPoint(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     _point   = (System.Drawing.PointF)info.GetValue(SerializationNames.ControlPointLocation, typeof(System.Drawing.PointF));
     _enabled = info.GetBoolean(SerializationNames.ControlPointEnabled);
 }
Пример #27
0
 protected UrlRangeModelBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     this.urlTemplate          = info.GetString("urlTemplate");
     this.replaceMark          = info.GetString("replaceMark");
     this.isWellFormatTemplate = info.GetBoolean("isWellFormatTemplate");
 }