Example #1
1
 protected DocumentException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     Line = info.GetInt32(nameof(Line));
     Column = info.GetInt32(nameof(Column));
     File = info.GetString(nameof(File));
 }
Example #2
0
        protected DiagnosticInfo(SerializationInfo info, StreamingContext context)
        {
            var messageProvider = (CommonMessageProvider)info.GetValue("messageProvider", typeof(CommonMessageProvider));
            int errorCode = info.GetInt32("errorCode");
            bool isWarningAsError = info.GetBoolean("isWarningAsError");
            int argCount = info.GetInt32("argumentCount");
            object[] arguments;

            if (argCount > 0)
            {
                arguments = new object[argCount];
                for (int i = 0; i < arguments.Length; i++)
                {
                    arguments[i] = info.GetValue(i.ToString(), typeof(object));
                }
            }
            else
            {
                arguments = null;
            }

            if (messageProvider == null || errorCode < 0)
            {
                throw new SerializationException();
            }

            this.arguments = arguments;
            this.messageProvider = messageProvider;
            this.errorCode = errorCode;
            this.isWarningAsError = isWarningAsError;
        }
 GameStateMachine(SerializationInfo info, StreamingContext unused)
 {
     MinTurns = info.GetInt32 ("MinTurns");
     MaxTurns = info.GetInt32 ("MaxTurns");
     MaxTurnsThisLevel = info.GetInt32 ("maxTurnsThisLevel");
     NumTurnsThisLevel = info.GetInt32 ("numTurnsThisLevel");
 }
Example #4
0
        public StarMapFeature(SerializationInfo info, StreamingContext context)
        {
            //m_Stride = info.GetInt32("m_Stride");
            //m_BytesPerPixel = info.GetInt32("m_BytesPerPixel");
            m_MaxBrightness = info.GetByte("m_MaxBrightness");

            m_MaxBrightnessFirstKey = info.GetUInt64("m_MaxBrightnessFirstKey");
            m_MaxBrightnessPixels = info.GetInt32("m_MaxBrightnessPixels");
            m_Generation = info.GetInt32("m_Generation");
            m_Merges = info.GetInt32("m_Merges");

            m_FeatureId = info.GetInt32("FeatureId");
            m_Intencity = info.GetUInt32("m_Intencity");

            int count = info.GetInt32("m_Pixels.Count");
            int idx = -1;
            m_Pixels = new SortedDictionary<ulong, uint>();
            for (int i = 0; i < count; i++)
            {
                idx++;
                ulong key = info.GetUInt64(string.Format("m_Pixels.{0}.Key", idx));
                uint val = info.GetUInt32(string.Format("m_Pixels.{0}.Value", idx));
                m_Pixels.Add(key, val);
            }
        }
Example #5
0
 protected PagingSetting(SerializationInfo info)
 {
     _pageSize = info.GetInt32("PageSize");
     _pageNum = info.GetInt32("PageNum");
     _pageCount = info.GetInt32("PageCount");
     _itemCount = info.GetInt32("ItemCount");
 }
Example #6
0
 protected BasePortalException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     InitializePrivateVariables();
     AssemblyVersion = info.GetString("m_AssemblyVersion");
     PortalID = info.GetInt32("m_PortalID");
     PortalName = info.GetString("m_PortalName");
     UserID = info.GetInt32("m_UserID");
     UserName = info.GetString("m_Username");
     ActiveTabID = info.GetInt32("m_ActiveTabID");
     ActiveTabName = info.GetString("m_ActiveTabName");
     RawURL = info.GetString("m_RawURL");
     AbsoluteURL = info.GetString("m_AbsoluteURL");
     AbsoluteURLReferrer = info.GetString("m_AbsoluteURLReferrer");
     UserAgent = info.GetString("m_UserAgent");
     DefaultDataProvider = info.GetString("m_DefaultDataProvider");
     ExceptionGUID = info.GetString("m_ExceptionGUID");
     m_InnerExceptionString = info.GetString("m_InnerExceptionString");
     FileName = info.GetString("m_FileName");
     FileLineNumber = info.GetInt32("m_FileLineNumber");
     FileColumnNumber = info.GetInt32("m_FileColumnNumber");
     Method = info.GetString("m_Method");
     m_StackTrace = info.GetString("m_StackTrace");
     m_Message = info.GetString("m_Message");
     m_Source = info.GetString("m_Source");
 }
        protected PlanningGrid(SerializationInfo info, StreamingContext context)
        {
            sizeX = info.GetInt32("sizeX");
            sizeY = info.GetInt32("sizeY");

            spacing = info.GetSingle("spacing");
            offsetX = info.GetSingle("offsetX");
            offsetY = info.GetSingle("offsetY");

            byte[] compData = (byte[])info.GetValue("data", typeof(byte[]));
            MemoryStream ms = new MemoryStream(compData, false);
            DeflateStream compStream = new DeflateStream(ms, CompressionMode.Decompress);
            BinaryReader reader = new BinaryReader(compStream);

            min = float.MaxValue;
            max = float.MinValue;

            data = new float[sizeX][];
            for (int x = 0; x < sizeX; x++) {
                data[x] = new float[sizeY];
                for (int y = 0; y < sizeY; y++) {
                    float value = reader.ReadSingle();
                    data[x][y] = value;

                    if (value < min) min = value;
                    if (value > max) max = value;
                }
            }
        }
 protected UrlSyntaxException(SerializationInfo info, StreamingContext ctxt)
    : base(info, ctxt)
 {
     _url = info.GetString("Url");
     _index = info.GetInt32("Index");
     _length = info.GetInt32("Length");
 }
Example #9
0
        /// <summary>
        /// Serialization constructor required for <see cref="ISerializable"/>; reads connection data from <paramref name="info"/>.
        /// </summary>
        /// <param name="info">Serialization store that we are going to read our data from.</param>
        /// <param name="context">Streaming context to use during the deserialization process.</param>
        protected RdpConnection(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            Animations = info.GetBoolean("Animations");
            AudioMode = info.GetValue<AudioMode>("AudioMode");
            ColorDepth = info.GetInt32("ColorDepth");
            ConnectClipboard = info.GetBoolean("ConnectClipboard");
            ConnectDrives = info.GetBoolean("ConnectDrives");
            ConnectPrinters = info.GetBoolean("ConnectPrinters");
            DesktopBackground = info.GetBoolean("DesktopBackground");
            DesktopComposition = info.GetBoolean("DesktopComposition");
            DesktopHeight = info.GetInt32("DesktopHeight");
            DesktopWidth = info.GetInt32("DesktopWidth");
            FontSmoothing = info.GetBoolean("FontSmoothing");
            KeyboardMode = info.GetValue<KeyboardMode>("KeyboardMode");
            PersistentBitmapCaching = info.GetBoolean("PersistentBitmapCaching");
            RecordingMode = info.GetValue<RecordingMode>("RecordingMode");
            VisualStyles = info.GetBoolean("VisualStyles");
            WindowContentsWhileDragging = info.GetBoolean("WindowContentsWhileDragging");
            ConnectToAdminChannel = info.GetBoolean("ConnectToAdminChannel");

            UseTSProxy = info.GetBoolean("UseTSProxy");
            ProxyName = info.GetString("ProxyName");
            ProxyUserName = info.GetString("ProxyUserName");

            string encryptedProxyPassword = info.GetString("ProxyPassword");
            if (!String.IsNullOrEmpty(encryptedProxyPassword))
            {
                EncryptedPassword = encryptedProxyPassword;
            }
        }
Example #10
0
		public ServiceException( SerializationInfo info, StreamingContext context ) : base( info, context )
		{
			instancesCreated = info.GetInt32( "instancesCreated" );
			description = info.GetString( "description" );
			details = info.GetString( "details" );
			code = info.GetInt32( "code" );
		}
Example #11
0
 private VideoFile(SerializationInfo info, DeserializeInfo di)
     : this(di.Server, di.Info, di.Type)
 {
     actors = info.GetValue("a", typeof(string[])) as string[];
       description = info.GetString("de");
       director = info.GetString("di");
       genre = info.GetString("g");
       title = info.GetString("t");
       try {
     width = info.GetInt32("w");
     height = info.GetInt32("h");
       }
       catch (Exception) {
       }
       var ts = info.GetInt64("du");
       if (ts > 0) {
     duration = new TimeSpan(ts);
       }
       try {
     bookmark = info.GetInt64("b");
       }
       catch (Exception) {
     bookmark = 0;
       }
       try {
     subTitle = info.GetValue("st", typeof(Subtitle)) as Subtitle;
       }
       catch (Exception) {
     subTitle = null;
       }
       initialized = true;
 }
Example #12
0
        public Block(SerializationInfo info, StreamingContext context)
        {
            // built-in value
            _bits = info.GetUInt32("built-int");
            // cutom bits
            _customBits = new uint[info.GetUInt16("cBitCount")];
            int length = _customBits.Length;
            for (int i = 0; i < length; i++)
            {
                _customBits[i] = info.GetUInt32("cBit" + i);
            }

            // custom floats
            length = info.GetUInt16("cFloatCount");
            _customFloats = new ConcurrentDictionary<int, float>(3, length * 2);
            for (int i = 0; i < length; i++)
            {
                _customFloats[info.GetInt32("cFloatKey" + i)] = info.GetSingle("cFloatValue" + i);
            }

            // custom strings
            length = info.GetUInt16("cStringCount");
            _customStrings = new ConcurrentDictionary<int, string>(3, length * 2);
            for (int i = 0; i < length; i++)
            {
                _customStrings[info.GetInt32("cStringKey" + i)] = info.GetString("cStringValue" + i);
            }
        }
 protected InvalidSqlException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     Input = info.GetString(InputNameKey);
     Row = info.GetInt32(RowNameKey);
     Column = info.GetInt32(ColumnNameKey);
 }
 internal UnitySerializationHolder(SerializationInfo info, StreamingContext context)
 {
     if (info == null)
     {
         throw new ArgumentNullException("info");
     }
     this.m_unityType = info.GetInt32("UnityType");
     if (this.m_unityType != 3)
     {
         if (this.m_unityType == 7)
         {
             this.m_declaringMethod = info.GetValue("DeclaringMethod", typeof(MethodBase)) as MethodBase;
             this.m_declaringType = info.GetValue("DeclaringType", typeof(Type)) as Type;
             this.m_genericParameterPosition = info.GetInt32("GenericParameterPosition");
             this.m_elementTypes = info.GetValue("ElementTypes", typeof(int[])) as int[];
         }
         else
         {
             if (this.m_unityType == 8)
             {
                 this.m_instantiation = info.GetValue("GenericArguments", typeof(Type[])) as Type[];
                 this.m_elementTypes = info.GetValue("ElementTypes", typeof(int[])) as int[];
             }
             this.m_data = info.GetString("Data");
             this.m_assemblyName = info.GetString("AssemblyName");
         }
     }
 }
Example #15
0
 /// <summary>
 /// A constructor with this signature must be implemented by descendants. 
 /// <see cref="System.Runtime.Serialization.ISerializable"/> for more information
 /// </summary>
 /// <param name="info">The <see cref="System.Runtime.Serialization.SerializationInfo"/> where is the serialized data.</param>
 /// <param name="context">The source (see <see cref="System.Runtime.Serialization.StreamingContext"/>) for this serialization.</param>
 protected AudioWriterConfig(SerializationInfo info, StreamingContext context)
 {
     int rate = info.GetInt32("Format.Rate");
     int bits = info.GetInt32("Format.Bits");
     int channels = info.GetInt32("Format.Channels");
     m_Format = new WaveFormat(rate, bits, channels);
 }
Example #16
0
        private Key(SerializationInfo info, StreamingContext context)
        {
            KeyDownStrokes = new List<KeyStroke>();
            KeyUpStrokes = new List<KeyStroke>();

            //int version = info.GetInt32("Version");

            Name = info.GetString("keyName");

            InfoWindowsKeys = info.GetString("InfoWindowsKeys");

            int totalKeyDown = info.GetInt32("TotalKeyDown");
            for (int i = 0; i < totalKeyDown; i++)
            {
                var ks = new KeyStroke();
                ks.code = info.GetUInt16("kd_c_" + i);
                ks.information = info.GetUInt32("kd_i_" + i);
                ks.state = (Keyboard.States)info.GetUInt16("kd_s_" + i);

                KeyDownStrokes.Add(ks);
            }

            int totalKeyUp = info.GetInt32("TotalKeyUp");
            for (int i = 0; i < totalKeyUp; i++)
            {
                var ks = new KeyStroke();
                ks.code = info.GetUInt16("ku_c_" + i);
                ks.information = info.GetUInt32("ku_i_" + i);
                ks.state = (Keyboard.States)info.GetUInt16("ku_s_" + i);

                KeyUpStrokes.Add(ks);
            }

        }
 protected CmdLineException(SerializationInfo s, StreamingContext c) : base(s, c) {
   this.errorCode = (CmdLineError)s.GetInt32("ErrorCode");
   this.context = s.GetString("Context");
   int lcid = s.GetInt32("LCID");
   if (lcid != LOCALE_USER_DEFAULT)
     this.culture = new CultureInfo(lcid);
 }
Example #18
0
 protected NewPortCommand(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _entityId = MathIdentifier.Parse(info.GetString("entityId"));
     _inputCnt = info.GetInt32("inputCount");
     _busCnt = info.GetInt32("busCount");
 }
Example #19
0
        /// <summary>
        /// </summary>
        /// <param name="info"> </param>
        /// <param name="context"> </param>
        public Version(SerializationInfo info, StreamingContext context)
            : this(null, info.GetString("Title"))
        {
            _cursorPosition = info.GetInt32("CursorPosition");
            _number = info.GetSingle("Number");
            int itemsCount = info.GetInt32("ItemsCount");
            int pagesCount = info.GetInt32("PageCount");
            for (int i = 0; i < itemsCount; i++)
            {
                try
                {
                    Option option = info.GetValue(string.Concat("Item", i), typeof (Option)) as Option;
                    option.Parent = this;
                    _items.Add(option);
                }
                catch (Exception)
                {
                    throw;
                }
            }

            for (int i = 0; i < pagesCount; i++)
            {
                Page page = info.GetValue(string.Concat("Page", i), typeof (Page)) as Page;
                if (page == null)
                    throw new NullReferenceException("page");

                page.Parent = this;
                _pages.Add(page);
            }
        }
	protected XmlException(SerializationInfo info, StreamingContext context)
		: base(info, context)
		{
			HResult = unchecked((int)0x80131940);
			lineNumber = info.GetInt32("lineNumber");
			linePosition = info.GetInt32("linePosition");
		}
        public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
        {
            Keyframe[] keyframes;

            AnimationCurve curve=new AnimationCurve();

            //	curve.preWrapMode=(WrapMode)info.GetValue("preWrapMode",typeof(WrapMode));
            //	curve.postWrapMode=(WrapMode)info.GetValue("postWrapMode",typeof(WrapMode));

            int numKeys=info.GetInt32("keysn");

            keyframes=new Keyframe[numKeys];

            Keyframe keyframeCurrent;
            for (int i=0; i<numKeys; i++) {
                keyframeCurrent=keyframes[i]=new Keyframe(info.GetSingle("keyt"+i),
                info.GetSingle("keyv"+i));
                keyframeCurrent.tangentMode=info.GetInt32("keymod"+i);
                keyframeCurrent.inTangent=info.GetSingle("keyin"+i);
                keyframeCurrent.outTangent=info.GetSingle("keyout"+i);
            }

            curve.keys = keyframes;

            // don't know how to make connection between AnimaitonCurver and Keyframes surrogate
            // AnimationCurve surrogate keys are constructed before thoose in Keyframe surrogate resulting in 0,0 Keyframes
            //return new AnimationCurve((Keyframe[])info.GetValue ("keys", typeof(Keyframe[])));

            return curve;
        }
 protected EMParsingErrorException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     Path = info.GetString("Path");
     Line = info.GetInt32("Line");
     Column = info.GetInt32("Column");
 }
Example #23
0
 public AudioConfig(SerializationInfo serializationInfo_0, StreamingContext streamingContext_0)
 {
     int @int = serializationInfo_0.GetInt32("Format.Rate");
     int int2 = serializationInfo_0.GetInt32("Format.Bits");
     int int3 = serializationInfo_0.GetInt32("Format.Channels");
     this.m_Format = new WaveFormat(@int, int2, int3);
 }
Example #24
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 public SliderOption(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _minValue = info.GetInt32("MinValue");
     _maxValue = info.GetInt32("MaxValue");
     _interval = info.GetInt32("Interval");
 }
 private InvalidRoleInfoException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _roleName = info.GetString("roleName");
      _minimumDegree = info.GetInt32("minimumDegree");
      _maximumDegree = info.GetInt32("maximumDegree");
 }
Example #26
0
 /// <summary>Initializes a new instance of a wild card pattern based on the serialization info.</summary>
 /// <param name="info">The serialization info.</param>
 /// <param name="context">The streaming context.</param>
 protected WildcardPattern(SerializationInfo info, StreamingContext context)
 {
     Guard.NotNull(info, "info");
     Pattern = info.GetString("Pattern");
     Options = (WildcardPatternOptions)info.GetInt32("Options");
     ComparisonType = (StringComparison)info.GetInt32("ComparisonType");
 }
 protected ModuleLoadException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     InitilizePrivateVariables();
     m_ModuleId = info.GetInt32("m_ModuleId");
     m_ModuleDefId = info.GetInt32("m_ModuleDefId");
     m_FriendlyName = info.GetString("m_FriendlyName");
 }
 /// <summary>
 /// TODO
 /// </summary>
 protected SyntaxErrorException(SerializationInfo info, StreamingContext context)
     : base(info.GetString("Message"))
 {
     Line = info.GetInt32("Line");
     Column = info.GetInt32("Column");
     _expression = info.GetString("Expression");
 }
Example #29
0
 public FileSizeFilterSettings(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     minimalSize__ = info.GetInt32("MinimalSize");
     maximalSize__ = info.GetInt32("MaximalSize");
     unit__ = (SizeUnit)info.GetInt32("SizeUnit");
 }
 public ImageProcessingResult(SerializationInfo info, StreamingContext context)
 {
    Key = info.GetString("Key");
    Result = (ResultType)info.GetInt32("Result");
    ZoomLevel = info.GetInt32("ZoomLevel");
    TileSize = info.GetInt32("TileSize");
 }
Example #31
0
 public HeaderCell(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     try
     {
         _Row = info.GetInt32("_Row");
     }
     catch
     {
         _Row = 0;
     }
     try
     {
         _Col = info.GetInt32("_Col");
     }
     catch
     {
         _Col = 0;
     }
     try
     {
         _Text = info.GetString("_Text");
     }
     catch
     {
         _Text = string.Empty;
     }
     try
     {
         _MergerdIndex = info.GetInt32("_MergerdIndex");
     }
     catch
     {
         _MergerdIndex = 0;
     }
     try
     {
         _MergerdCount = info.GetInt32("_MergerdCount");
     }
     catch
     {
         _MergerdCount = 0;
     }
     try
     {
         _ChangeStyle = info.GetBoolean("_ChangeStyle");
     }
     catch
     {
         _ChangeStyle = false;
     }
     try
     {
         _CellStyle = (Webb.Reports.ExControls.IBasicStyle)info.GetValue("_CellStyle", typeof(Webb.Reports.ExControls.IBasicStyle));
     }
     catch
     {
         _CellStyle = new BasicStyle();
     }
 }
Example #32
0
 protected OpenCVException(System.Runtime.Serialization.SerializationInfo info,
                           System.Runtime.Serialization.StreamingContext context) : base(info, context)
 {
     Status   = (ErrorCode)info.GetInt32(nameof(Status));
     FuncName = info.GetString(nameof(FuncName));
     FileName = info.GetString(nameof(FileName));
     ErrMsg   = info.GetString(nameof(ErrMsg));
     Line     = info.GetInt32(nameof(Line));
 }
Example #33
0
 protected BaseVBAScriptTask(System.Runtime.Serialization.SerializationInfo s, System.Runtime.Serialization.StreamingContext c)
 {
     m_runningtime   = s.GetInt32("RunningTime");
     m_errortime     = s.GetInt32("ErrorTime");
     m_domainGUID    = s.GetString("DomainGUID");
     m_taskchainGUID = s.GetString("TaskChainGUID");
     m_timestamp     = (DateTime)s.GetValue("TimeStamp", m_timestamp.GetType());
     m_taskstatus    = (TaskStatus)s.GetValue("Status", m_taskstatus.GetType());
     m_vbaobjs       = (Dictionary <string, IVBAObject>)s.GetValue("VBAObjects", m_vbaobjs.GetType());
 }
Example #34
0
 protected MyCustomException(
     System.Runtime.Serialization.SerializationInfo info,
     System.Runtime.Serialization.StreamingContext context) : base(info, context)
 {
     Value1 = info.GetInt32("v1");
     Value2 = info.GetString("v2");
 }
Example #35
0
 public ReElement(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     try
     {
         _Value = info.GetString("_Value");
     }
     catch
     {
         _Value = string.Empty;
     }
     try
     {
         _Frequence = info.GetInt32("_Frequence");
     }
     catch
     {
         _Frequence = 0;
     }
     try
     {
         _FilterType = (Webb.Data.FilterTypes)info.GetValue("_FilterType", typeof(Webb.Data.FilterTypes));
     }
     catch
     {
         _FilterType = FilterTypes.NumGreaterOrEqual;
     }
     try
     {
         _FollowedOperand = (Webb.Data.FilterOperands)info.GetValue("_FollowedOperand", typeof(Webb.Data.FilterOperands));
     }
     catch
     {
         _FollowedOperand = FilterOperands.Or;
     }
 }
Example #36
0
 public MyException(System.Runtime.Serialization.SerializationInfo info,
                    System.Runtime.Serialization.StreamingContext context)
     : base(info, context)
 {
     campo = info.GetInt32("campo");
     mo    = (MyRemoteInterface)info.GetValue("mo", typeof(MyRemoteInterface));
 }
 protected PdftopngsException(
     System.Runtime.Serialization.SerializationInfo serializationInfo,
     System.Runtime.Serialization.StreamingContext streamingContext
     )
     : base(serializationInfo, streamingContext)
 {
     ErrorCode    = serializationInfo.GetInt32("ErrorCode");
     ErrorMessage = serializationInfo.GetString("ErrorMessage");
 }
Example #38
0
 protected UtoiConvertException(
     System.Runtime.Serialization.SerializationInfo info,
     System.Runtime.Serialization.StreamingContext context) : base(info, context)
 {
     if (info != null)
     {
         TokenIndex = info.GetInt32("TokenIndex");
     }
 }
Example #39
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 protected FlexMailException(
     System.Runtime.Serialization.SerializationInfo info,
     System.Runtime.Serialization.StreamingContext context) : base(info, context)
 {
     if (info != null)
     {
         this.Code = info.GetInt32("_code");
     }
 }
    // called when de-serializing (binary)
    protected Pet(System.Runtime.Serialization.SerializationInfo info,
                  System.Runtime.Serialization.StreamingContext context)
    {
        Toys = new List <Toy>();
        int counter = info.GetInt32("ListCount");

        for (int index = 0; index < counter; index++)
        {
            Toys.Add((Toy)info.GetValue(string.Format("Toy{0}", index.ToString()), typeof(Toy)));
        }
    }
Example #41
0
        protected TestExecutionException(
            System.Runtime.Serialization.SerializationInfo info,
            System.Runtime.Serialization.StreamingContext context) : base(info, context)
        {
            if (info == null)
            {
                throw new ArgumentNullException("info");
            }

            ErrorCode = info.GetInt32("ErrorCode");
        }
Example #42
0
        /// <summary>
        /// Constructor required for serialisation purposes. Not recommended for direct use.
        /// </summary>
        /// <param name="info">A <see cref="System.Runtime.Serialization.SerializationInfo"/> instance used to deserialise the object.</param>
        /// <param name="context">A <see cref="System.Runtime.Serialization.StreamingContext"/> instance used to deserialise the object.</param>
        protected NtpNetworkException(
            System.Runtime.Serialization.SerializationInfo info,
            System.Runtime.Serialization.StreamingContext context) : base(info, context)
        {
            if (info == null)
            {
                throw new ArgumentNullException(nameof(info));
            }

            _SocketErrorCode = info.GetInt32("SocketErrorCode");
        }
Example #43
0
 public WizardCustomStylesCollection(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
 {
     try
     {
         templateType = (Webb.Reports.ReportWizard.WizardInfo.TemplateType)info.GetValue("templateType", typeof(Webb.Reports.ReportWizard.WizardInfo.TemplateType));
     }
     catch
     {
     }
     try
     {
         _DefaultReportStyleIndex = info.GetInt32("_DefaultReportStyleIndex");
     }
     catch
     {
         _DefaultReportStyleIndex = 0;
     }
 }
Example #44
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XmppException"/> class.
 /// </summary>
 /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
 /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
 protected XmppException(
     System.Runtime.Serialization.SerializationInfo info,
     System.Runtime.Serialization.StreamingContext context) : base(info, context)
 {
     ErrorCode = (XmppErrorCode)info.GetInt32("ErrorCode");
 }
Example #45
0
 public MaskInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     try
     {
         this._VerticalAlignment = (DevExpress.Utils.VertAlignment)info.GetValue("_VerticalAlignment", typeof(DevExpress.Utils.VertAlignment));
     }
     catch
     {
         _VerticalAlignment = VertAlignment.Bottom;
     }
     try
     {
         _TitleFont = (System.Drawing.Font)info.GetValue("_TitleFont", typeof(System.Drawing.Font));
     }
     catch
     {
         _TitleFont = new Font(AppearanceObject.DefaultFont.FontFamily, 10f);
     }
     try
     {
         _TitleTextColor = (System.Drawing.Color)info.GetValue("_TitleTextColor", typeof(System.Drawing.Color));
     }
     catch
     {
         _TitleTextColor = Color.Black;
     }
     try
     {
         _TitleBackColor = (System.Drawing.Color)info.GetValue("_TitleBackColor", typeof(System.Drawing.Color));
     }
     catch
     {
         _TitleBackColor = Color.Transparent;
     }
     try
     {
         _Title = info.GetString("_Title");
     }
     catch
     {
         _Title = string.Empty;
     }
     try
     {
         _DateFormat = info.GetString("_DateFormat");
     }
     catch
     {
         _DateFormat = @"M/d/yy";
     }
     try
     {
         _TitleAlignment = (DevExpress.Utils.HorzAlignment)info.GetValue("_TitleAlignment", typeof(DevExpress.Utils.HorzAlignment));
     }
     catch
     {
         _TitleAlignment = HorzAlignment.Center;
     }
     try
     {
         _MaskedField = info.GetString("_MaskedField");
     }
     catch
     {
         _MaskedField = string.Empty;
     }
     try
     {
         _MaskedFont = (System.Drawing.Font)info.GetValue("_MaskedFont", typeof(System.Drawing.Font));
     }
     catch
     {
         _MaskedFont = new Font(AppearanceObject.DefaultFont.FontFamily, 10f);
     }
     try
     {
         _MaskedWidth = info.GetInt32("_MaskedWidth");
     }
     catch
     {
         _MaskedWidth = 55;
     }
     try
     {
         this._MaskedTextColor = (System.Drawing.Color)info.GetValue("_MaskedTextColor", typeof(System.Drawing.Color));
     }
     catch
     {
         _MaskedTextColor = Color.Black;
     }
     try
     {
         this._MaskedBackColor = (System.Drawing.Color)info.GetValue("_MaskedBackColor", typeof(System.Drawing.Color));
     }
     catch
     {
         _MaskedBackColor = Color.Transparent;
     }
     try
     {
         this._MaskedAlignment = (DevExpress.Utils.HorzAlignment)info.GetValue("_MaskedAlignment", typeof(DevExpress.Utils.HorzAlignment));
     }
     catch
     {
         _MaskedAlignment = HorzAlignment.Center;
     }
     try
     {
         this._TitleWidth = info.GetInt32("_TitleWidth");
     }
     catch
     {
         _TitleWidth = 55;
     }
     try
     {
         this._ShowTitle = info.GetBoolean("_ShowTitle");
     }
     catch
     {
         _ShowTitle = true;
     }
     try
     {
         this._ShowUnderLine = info.GetBoolean("_ShowUnderLine");
     }
     catch
     {
         this._ShowUnderLine = true;
     }
     try
     {
         this._BrotherMaskInfos = (MaskInfoCollection)info.GetValue("_BrotherMaskInfos", typeof(MaskInfoCollection));
     }
     catch
     {
         _BrotherMaskInfos = new MaskInfoCollection();
     }
 }
Example #46
0
 public ReportWizardSetting(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     try
     {
         _CategoryDataType = info.GetByte("_CategoryDataType");
     }
     catch
     {
         _CategoryDataType = 0;
     }
     try
     {
         _TemplateType = info.GetByte("_TemplateType");
     }
     catch
     {
         _TemplateType = 0;
     }
     try
     {
         _AddScFilters = info.GetBoolean("_AddScFilters");
     }
     catch
     {
         _AddScFilters = false;
     }
     try
     {
         _AddWatermark = info.GetBoolean("_AddWatermark");
     }
     catch
     {
         _AddWatermark = false;
     }
     try
     {
         _SelectedStyleName = info.GetString("_SelectedStyleName");
     }
     catch
     {
         _SelectedStyleName = string.Empty;
     }
     try
     {
         _GroupTemplateType = info.GetByte("_GroupTemplateType");
     }
     catch
     {
         _GroupTemplateType = 0;
     }
     try
     {
         _CreateByWizard = info.GetBoolean("_CreateByWizard");
     }
     catch
     {
         _CreateByWizard = false;
     }
     try
     {
         _HeaderStyleName = info.GetString("_HeaderStyleName");
     }
     catch
     {
         _HeaderStyleName = string.Empty;
     }
     try
     {
         _GameListStyleName = info.GetString("_GameListStyleName");
     }
     catch
     {
         _GameListStyleName = string.Empty;
     }
     try
     {
         _ProductTypes = info.GetInt32("_ProductTypes");
     }
     catch
     {
         _ProductTypes = (int)WebbDBTypes.WebbAdvantageFootball;
     }
 }
 public RepeatControlView(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
 {
     try
     {
         _AfterLast = info.GetBoolean("_AfterLast");
     }
     catch
     {
         _AfterLast = false;
     }
     try
     {
         _RepeatSetting = (Webb.Reports.PageGroupInfo)info.GetValue("_RepeatSetting", typeof(Webb.Reports.PageGroupInfo));
     }
     catch
     {
         _RepeatSetting = new PageFieldInfo("");
     }
     try
     {
         _RepeatedWidth = info.GetSingle("_RepeatedWidth");
     }
     catch
     {
         _RepeatedWidth = 240f;
     }
     try
     {
         _RepeatedHeight = info.GetSingle("_RepeatedHeight");
     }
     catch
     {
         _RepeatedHeight = 240f;
     }
     try
     {
         _RepeatedCount = info.GetInt32("_RepeatedCount");
     }
     catch
     {
         _RepeatedCount = 3;
     }
     try
     {
         _RepeatedVerticalCount = info.GetInt32("_RepeatedVerticalCount");
     }
     catch
     {
         _RepeatedVerticalCount = 3;
     }
     try
     {
         _RepeatTopCount = info.GetInt32("_RepeatTopCount");
     }
     catch
     {
         _RepeatTopCount = 0;
     }
     try
     {
         _ChartColorWhenMax = (System.Drawing.Color)info.GetValue("_ChartColorWhenMax", typeof(System.Drawing.Color));
     }
     catch
     {
         _ChartColorWhenMax = Color.Empty;
     }
 }
Example #48
0
 public PortDescriptor(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     _key         = info.GetString("Key");
     _description = info.GetString("Description");
     _offset      = info.GetInt32("Offset");
 }
Example #49
0
        public PageGroupInfo(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            try
            {
                _PageValueCount = info.GetInt32("_PageValueCount");
            }
            catch
            {
                _PageValueCount = 1;
            }
            try
            {
                _SortingType = (Webb.Reports.SortTypes)info.GetValue("_SortingType", typeof(Webb.Reports.SortTypes));
            }
            catch
            {
            }
            try
            {
                _SortingByType = (Webb.Reports.SortByTypes)info.GetValue("_SortingByType", typeof(Webb.Reports.SortByTypes));
            }
            catch
            {
            }
            try
            {
                _GroupTitle = info.GetString("_GroupTitle");
            }
            catch
            {
                _GroupTitle = string.Empty;
            }
            try
            {
                _SkippedCount = info.GetInt32("_SkippedCount");
            }
            catch
            {
                _SkippedCount = 0;
            }
            try
            {
                _TopCount = info.GetInt32("_TopCount");
            }
            catch
            {
                _TopCount = 0;
            }
            try
            {
                _Repeat = info.GetBoolean("_Repeat");
            }
            catch
            {
                _Repeat = false;
            }
            try
            {
                _RepeatTitle = info.GetString("_RepeatTitle");
            }
            catch
            {
                _RepeatTitle = string.Empty;
            }
            try
            {
                _SubPageGroupInfos = (Webb.Reports.PageGroupCollection)info.GetValue("_SubPageGroupInfos", typeof(Webb.Reports.PageGroupCollection));
            }
            catch
            {
            }
            try
            {
                _ParentPageGroupInfo = (Webb.Reports.PageGroupInfo)info.GetValue("_ParentPageGroupInfo", typeof(Webb.Reports.PageGroupInfo));
            }
            catch
            {
            }
            try
            {
                _ReportScType = (Webb.Reports.ReportScType)info.GetValue("_ReportScType", typeof(Webb.Reports.ReportScType));
            }
            catch
            {
            }
            try
            {
                _Filter = (Webb.Data.DBFilter)info.GetValue("_Filter", typeof(Webb.Data.DBFilter));

                this._Filter = AdvFilterConvertor.GetAdvFilter(DataProvider.VideoPlayBackManager.AdvReportFilters, this._Filter);                  //2009-4-29 11:37:37@Simon Add UpdateAdvFilter
            }
            catch
            {
                _Filter = new DBFilter();
            }
        }
        public MaskedTextControlView(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context)
        {
            try
            {
                _SortingColumns = (SortingColumnCollection)info.GetValue("_SortingColumns", typeof(SortingColumnCollection));
            }
            catch
            {
                _SortingColumns = new SortingColumnCollection();
            }
            try
            {
                _AutoAdjustTitleSize = info.GetBoolean("_AutoAdjustTitleSize");
            }
            catch
            {
                _AutoAdjustTitleSize = true;
            }
            try
            {
                _MakeChanges = false;

                this._ColumnsWidth = info.GetValue("_ColumnsWidth", typeof(Int32Collection)) as Int32Collection;
            }
            catch
            {
                _MakeChanges = true;

                this._ColumnsWidth = new Int32Collection();
            }
            try
            {
                this._MaskInfoSetting = (Webb.Reports.ExControls.Data.MaskInfoCollection)info.GetValue("_MaskInfoSetting", typeof(Webb.Reports.ExControls.Data.MaskInfoCollection));
            }
            catch
            {
                _MaskInfoSetting = new MaskInfoCollection();
            }

            try
            {
                this._RowsHight = info.GetValue("_RowsHight", typeof(Int32Collection)) as Int32Collection;
            }
            catch
            {
                this._RowsHight = new Int32Collection();;
            }
            try
            {
                _IndexedRow = info.GetInt32("_IndexedRow");
            }
            catch
            {
                _IndexedRow = 0;
            }
            try
            {
                this._Filter = (DBFilter)info.GetValue("_AutoAdjustTitleSize", typeof(DBFilter));
            }
            catch
            {
                _Filter = new DBFilter();
            }
        }
Example #51
0
        public HorizontalGridData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            try
            {
                _SortingField = info.GetString("_SortingByField");
            }
            catch
            {
                _SortingField = string.Empty;
            }

            try
            {
                _SortingBy = (SortingByTypes)info.GetValue("_SortingByType", typeof(SortingByTypes));
            }
            catch
            {
                _SortingBy = SortingByTypes.DateTime;
            }

            try
            {
                _Sorting = (SortingTypes)info.GetValue("_SortingType", typeof(SortingTypes));
            }
            catch
            {
                _Sorting = SortingTypes.Descending;
            }

            try
            {
                _FieldTitle = info.GetString("_FieldTitle");
            }
            catch
            {
                _FieldTitle = string.Empty;
            }

            try
            {
                _UnitsTitle = info.GetString("_UnitsTitle");
            }
            catch
            {
                _UnitsTitle = string.Empty;
            }

            try
            {
                _TopCount = info.GetInt32("_TopCount");
            }
            catch
            {
                _TopCount = 7;
            }

            try
            {
                _DateFormat = info.GetString("_DateFormat");
            }
            catch
            {
                _DateFormat = @"M/d/yy";
            }
        }
 private JsonParserException(System.Runtime.Serialization.SerializationInfo info, StreamingContext context)
 {
     Position    = info.GetInt32("$Position");
     ContextText = info.GetString("$ContextText");
     Reason      = info.GetString("$Reason");
 }
Example #53
0
 public ValueColor(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
 {
     try
     {
         _LengthConnector = info.GetInt32("_LengthConnector");
     }
     catch
     {
         _LengthConnector = 0;
     }
     try
     {
         _Value = info.GetString("_Value");
     }
     catch
     {
         _Value = string.Empty;
     }
     try
     {
         _Color = (System.Drawing.Color)info.GetValue("_Color", typeof(System.Drawing.Color));
     }
     catch
     {
         _Color = Color.Empty;
     }
     try
     {
         _TextColor = (System.Drawing.Color)info.GetValue("_TextColor", typeof(System.Drawing.Color));
     }
     catch
     {
         _TextColor = Color.Empty;
     }
     try
     {
         _RectBorderColor = (System.Drawing.Color)info.GetValue("_RectBorderColor", typeof(System.Drawing.Color));
     }
     catch
     {
         _RectBorderColor = Color.Empty;
     }
     try
     {
         _Hidden = info.GetBoolean("_Hidden");
     }
     catch
     {
         _Hidden = false;
     }
     try
     {
         _GradientColor = (System.Drawing.Color)info.GetValue("_GradientColor", typeof(System.Drawing.Color));
     }
     catch
     {
         _GradientColor = Color.Empty;
     }
     try
     {
         _GradientAngle = info.GetSingle("_GradientAngle");
     }
     catch
     {
         _GradientAngle = 0f;
     }
 }