Example #1
0
 //serialization constructor
 protected SerQuaternion(SerializationInfo info,StreamingContext context)
 {
     x = (float)info.GetValue("x",typeof(float));
     y = (float)info.GetValue("y",typeof(float));
     z = (float)info.GetValue("z",typeof(float));
     w = (float)info.GetValue("w",typeof(float));
 }
Example #2
0
 public Resource(SerializationInfo info, StreamingContext context)
     : base(1,(string) info.GetValue("type", typeof(string)), null, (string) info.GetValue("description", typeof(string)), null)
 {
     // Reset the property value using the GetValue method.
     tier = (int) info.GetValue("tier", typeof(int));
     use = (int) info.GetValue ("use", typeof(int));
 }
Example #3
0
 public SaveData(SerializationInfo info, StreamingContext ctxt)
 {
     mapName = (string)info.GetValue ("mapName", typeof(string));
     playerLocation = (float[])info.GetValue ("playerLocation", typeof(float[]));
     activeQuests = (List<Quest>)info.GetValue ("activeQuests", typeof(List<Quest>));
     completedQuests = (List<Quest>)info.GetValue ("completedQuests", typeof(List<Quest>));
 }
Example #4
0
 public GameplayMessage(SerializationInfo info, StreamingContext context)
 {
     Message = (MessageValue)info.GetByte ("Message");
     PlayerID = info.GetInt32 ("PlayerID");
     MoveDelta = new Vector2((float)info.GetValue("x",typeof(float)),(float)info.GetValue("y",typeof(float)));
     OldPosition = new Vector3((float)info.GetValue("xloc", typeof(float)), (float)info.GetValue("yloc", typeof(float)), (float)info.GetValue("zloc", typeof(float)));
 }
 //Serializatoin counstructor. call when Deserialize function called.
 public CBahram_SALContainer(SerializationInfo info, StreamingContext context)
 {
     var1 = (int)info.GetValue("var1",typeof(int));
     var2 = (int)info.GetValue("var2",typeof(int));
     var3 = (int)info.GetValue("var3",typeof(int));
     var4 = (int)info.GetValue("var4",typeof(int));
 }
 public ProfileSaveData(SerializationInfo aInfo, StreamingContext aContext)
     : base()
 {
     m_Name = (string)aInfo.GetValue("Name", typeof(string));
     m_ProfileName = (string)aInfo.GetValue("ProfileName", typeof(string));
     m_ProgressionLevel = (int)aInfo.GetValue("ProgressionLevel", typeof(int));
 }
Example #7
0
 public CUBEGridInfo(SerializationInfo info, StreamingContext context)
 {
     position = (sVector3)info.GetValue("position", typeof(sVector3));
     rotation = (sVector3)info.GetValue("rotation", typeof(sVector3));
     weaponMap = info.GetInt32("weaponMap");
     augmentationMap = info.GetInt32("augmentationMap");
     colors = (int[])info.GetValue("colors", typeof(int[]));
 }
 public System.Object SetObjectData(System.Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
 {
     Vector2 v2 = (Vector2)obj;
     v2.x = (float)info.GetValue("x", typeof(float));
     v2.y = (float)info.GetValue("y", typeof(float));
     obj = v2;
     return obj;
 }
	public TransformationInfo(SerializationInfo info, StreamingContext ctxt)
	{
		Show = (bool)info.GetValue("Show", typeof(bool));
		Transformation = (SpriteAnimation.TransformationType)info.GetValue("Transformation", typeof(SpriteAnimation.TransformationType));
		NormalEasing = (EZAnimation.EASING_TYPE)info.GetValue("NormalEasing", typeof(EZAnimation.EASING_TYPE));
		ReverseEasing = (EZAnimation.EASING_TYPE)info.GetValue("ReverseEasing", typeof(EZAnimation.EASING_TYPE));
		TransformationKeyList = (List<TransformationKeyInfo>)info.GetValue("AnimationKeyList", typeof(List<TransformationKeyInfo>));
	}
Example #10
0
        public void SetState(SerializationInfo info)
        {
            if (info == null)
                throw new ArgumentNullException("info");

            Id = info.GetValue<int>("Id");
            Name = info.GetValue<string>("Name");
        }
Example #11
0
	// deserialized constructor
	
	public Saving(SerializationInfo info, StreamingContext ctxt)
	{
		// get the values from info and assign them to the appropriate properties
		
		health = (int)info.GetValue("Health", typeof(int));
		name = (string)info.GetValue("Name", typeof(string));
		
	}
Example #12
0
 public VoxelVolumeData(SerializationInfo info, StreamingContext ctxt)
 {
     data = (byte[])info.GetValue("data", typeof(byte[]));
     colors = (float[,])info.GetValue("colors", typeof(float[,]));
     dimensions = (ushort[])info.GetValue("dimensions", typeof(ushort[]));
     voxelScale = (float)info.GetValue("voxelScale", typeof(float));
     centerOffset = (int[])info.GetValue("centerOffset", typeof(int[]));
 }
 // This constructor is called automatically by the parent class, ISerializable
 // We get to custom-implement the serialization process here
 public SaveData(SerializationInfo info, StreamingContext ctxt)
 {
     // Get the values from info and assign them to the appropriate properties. Make sure to cast each variable.
     // Do this for each var defined in the Values section above
     ConeUnlocked = (bool)info.GetValue("ConeUnlocked", typeof(bool));
     HiScore = (int)info.GetValue("HiScore", typeof(int));
     ExplosivesLeft = (int)info.GetValue("ExplosivesLeft", typeof(int));
 }
Example #14
0
 // This constructor is called automatically by the parent class, ISerializable
 // We get to custom-implement the serialization process here
 public SaveData(SerializationInfo info, StreamingContext ctxt)
 {
     // Get the values from info and assign them to the appropriate properties. Make sure to cast each variable.
     // Do this for each var defined in the Values section above
     boardWidth = (int)info.GetValue ("boardWidth", typeof(int));
     boardHeight = (int)info.GetValue ("boardHeight", typeof(int));
     tiles = (Tile[])info.GetValue("tiles", typeof(Tile));
 }
 public System.Object SetObjectData(System.Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
 {
     Ray ray = (Ray)obj;
     ray.origin = (Vector3)info.GetValue("origin", typeof(Vector3));
     ray.direction = (Vector3)info.GetValue("direction", typeof(Vector3));
     obj = ray;
     return obj;
 }
Example #16
0
    // This constructor is called automatically by the parent class, ISerializable
    // We get to custom-implement the serialization process here
    public SaveData(SerializationInfo info, StreamingContext ctxt)
    {
        // Get the values from info and assign them to the appropriate properties. Make sure to cast each variable.
        // Do this for each var defined in the Values section above
        foundGem1 = (bool)info.GetValue("foundGem1", typeof(bool));
        score = (float)info.GetValue("score", typeof(float));

        levelReached = (int)info.GetValue("levelReached", typeof(int));
    }
 // Method called to deserialize a Vector3 object
 public System.Object SetObjectData(System.Object obj,SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
 {
     Color c = (Color) obj;
     c.r = (float)info.GetValue("r", typeof(float));
     c.g = (float)info.GetValue("g", typeof(float));
     c.b = (float)info.GetValue("b", typeof(float));
     obj = c;
     return obj;   // Formatters ignore this return value //Seems to have been fixed!
 }
Example #18
0
 public Artificial(SerializationInfo info, StreamingContext context)
 {
     // Reset the property value using the GetValue method.
     spaceTaken = (int) info.GetValue ("spaceTaken", typeof(int));
     type = (string) info.GetValue ("type", typeof(string));
     description = (string) info.GetValue ("description", typeof(string));
     model = (string) info.GetValue ("model", typeof(string));
     recipe = (Dictionary<Artificial, int>) info.GetValue ("recipe", typeof(Dictionary<Artificial, int>));
 }
Example #19
0
        public void SetState(SerializationInfo info)
        {
            if (info == null)
                throw new ArgumentNullException("info");

            LdapProfileId = info.GetValue<int>("LdapProfileId");
            ProcessName = info.GetValue<string>("ProcessName");
            SyncProcessName = info.GetValue<string>("SyncProcessName");
        }
Example #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Portal"/> class.
 /// </summary>
 /// <param name="info">
 /// The info.
 /// </param>
 /// <param name="context">
 /// The context.
 /// </param>
 public Portal(SerializationInfo info, StreamingContext context)
 {
     var firstSquare = (Tuple<int, int>)info.GetValue("LinkedSquaresFirst", typeof(Tuple<int, int>));
     var secondSquare = (Tuple<int, int>)info.GetValue("LinkedSquaresSecond", typeof(Tuple<int, int>));
     this.LinkedSquares = new Tuple<MapSquare, MapSquare>(
         new MapSquare(firstSquare.First, firstSquare.Second),
         new MapSquare(secondSquare.First, secondSquare.Second));
     this.LinkedAreas = (Tuple<int, int>)info.GetValue("LinkedAreas", typeof(Tuple<int, int>));
 }
Example #21
0
    public BasicConnection(SerializationInfo info, StreamingContext ctxt)
    {
        skillName = "BasicConnection";
        skillDescription = "Throws a cable at targeted unit and transfers data, depending on target, it may heal allies or damage enemies.";

        skillLevel = (int)info.GetValue("BASICCONNECTION_SKILLEVEL",typeof(int));
        skillExperience = (int)info.GetValue("BASICCONNECTION_SKILLEXPERIENCE",typeof(int));
        skillCoolDown = (int)info.GetValue("BASICCONNECTION_SKILLCOOLDOWN",typeof(int));
        skillPower = (int)info.GetValue("BASICCONNECTION_SKILLPOWER",typeof(int));
    }
 public System.Object SetObjectData(System.Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
 {
     Quaternion q;
     q.x = (float)info.GetValue ("x", typeof(float));
     q.y = (float)info.GetValue ("y", typeof(float));
     q.z = (float)info.GetValue ("z", typeof(float));
     q.w = (float)info.GetValue ("w", typeof(float));
     obj = q;
     return obj;
 }
Example #23
0
    public Tree(SerializationInfo info, StreamingContext ctxt)
    {
        skillName = "Tree";
        skillDescription = "Branches comes out and damages all opponents, where each opponent is a node and deals more damage with more nodes.";

        skillLevel = (int)info.GetValue("TREE_SKILLEVEL",typeof(int));
        skillExperience = (int)info.GetValue("TREE_SKILLEXPERIENCE",typeof(int));
        skillCoolDown = (int)info.GetValue("TREE_SKILLCOOLDOWN",typeof(int));
        skillPower = (int)info.GetValue("TREE_SKILLPOWER",typeof(int));
    }
 //Serializatoin counstructor
 public CSaveFileInfo_SALContainer(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     SaveFileInfo = new stSaveFileInfo();
     SaveFileInfo.DateAndTime = (string)info.GetValue("DateAndTime",  typeof(string));
     SaveFileInfo.ElapsedTime = (string)info.GetValue("ElapsedTime",  typeof(string));
     SaveFileInfo.Scene       = (string)info.GetValue("Scene",        typeof(string));
     SaveFileInfo.Index       = (int)   info.GetValue("Index",        typeof(int));
     SaveFileInfo.SaveCount   = (int)   info.GetValue("SaveCount",    typeof(int));
 }
Example #25
0
    public Graph(SerializationInfo info, StreamingContext ctxt)
    {
        skillName = "Graph";
        skillDescription = "Target's computer crashes causing them to panic, resulting in a one turn stun.";

        skillLevel = (int)info.GetValue("GRAPH_SKILLEVEL",typeof(int));
        skillExperience = (int)info.GetValue("GRAPH_SKILLEXPERIENCE",typeof(int));
        skillCoolDown = (int)info.GetValue("GRAPH_SKILLCOOLDOWN",typeof(int));
        skillPower = (int)info.GetValue("GRAPH_SKILLPOWER",typeof(int));
    }
Example #26
0
    // This constructor is called automatically by the parent class, ISerializable
    // We get to custom-implement the serialization process here
    public SaveData(SerializationInfo info, StreamingContext ctxt)
    {
        // Get the values from info and assign them to the appropriate properties. Make sure to cast each variable.
        // Do this for each var defined in the Values section above
        currentLevel = (int)info.GetValue("currentLevel", typeof(int));
        exp = (int)info.GetValue("exp", typeof(int));
        gold = (int)info.GetValue("gold", typeof(int));
        weapon1 = (int)info.GetValue("weapon1", typeof(int));
        weapon2 = (int)info.GetValue("weapon2", typeof(int));

        //levelReached = (int)info.GetValue("levelReached", typeof(int));
    }
Example #27
0
        /// <inheritdoc/>
        protected Xunit1TestCase(SerializationInfo info, StreamingContext context)
        {
            reflectionWrapper = new Xunit1ReflectionWrapper(
                info.GetString("AssemblyFileName"),
                info.GetString("TypeName"),
                info.GetString("MethodName")
            );

            DisplayName = info.GetString("DisplayName");
            SkipReason = info.GetString("SkipReason");
            SourceInformation = info.GetValue<SourceInformation>("SourceInformation");
            Traits = info.GetValue<IDictionary<string, string>>("Traits");
        }
 public KeyframeInfo(SerializationInfo info, StreamingContext ctxt)
 {
     this.tx = (float)info.GetValue("Tx", typeof(float));
     this.ty = (float)info.GetValue("Ty", typeof(float));
     this.tz = (float)info.GetValue("Tz", typeof(float));
     this.rot = (Quaternion)info.GetValue("Rot", typeof(Quaternion));
     this.dorsalAngle = (float)info.GetValue("DAng", typeof(float));
     this.lpelvicAngles = (Vector2)info.GetValue("lpelAng", typeof(Vector2));
     this.rpelvicAngles = (Vector2)info.GetValue("rpelAng", typeof(Vector2));
     this.lpectAngles = (Vector2)info.GetValue("rpectAng", typeof(Vector2));
     this.rpectAngles = (Vector2)info.GetValue("rpectAng", typeof(Vector2));
     this.analAngles = (Vector2)info.GetValue("analAng", typeof(Vector2));
 }
 // Constructor for deserialization - should be used by serializer
 public Drawing(SerializationInfo info, StreamingContext ctxt)
 {
     name = info.GetString("Name");
     author = info.GetString("Author");
     timestamp = (DateTime)info.GetValue("Timestamp", typeof(DateTime));
     item = info.GetString("Item");
     byte[] bgBytes = (byte[])info.GetValue("Background", typeof(byte[]));
     backgroundA = bgBytes[0];
     backgroundR = bgBytes[1];
     backgroundG = bgBytes[2];
     backgroundB = bgBytes[3];
     strokes = (List<SampledStroke>)info.GetValue("Strokes", typeof(List<SampledStroke>));
     readOnly = true;
 }
Example #30
0
    //serialization constructor
    protected SavedState(SerializationInfo info,StreamingContext context)
    {
        try {
            this.position = (SerVector3)info.GetValue("position",typeof(SerVector3));
            this.rotation = (SerQuaternion)info.GetValue("rotation",typeof(SerQuaternion));
        } catch {
            //not available if used an older version to save the replay, ignore
        }
        this.localPosition = (SerVector3)info.GetValue("localPosition",typeof(SerVector3));
        this.localRotation = (SerQuaternion)info.GetValue("localRotation",typeof(SerQuaternion));

        emittingParticles = info.GetBoolean("emittingParticles");
        isActive = info.GetBoolean("isActive");
    }
        /// <summary>
        /// Initializes a new instance of the <see cref="MailChimpException"/> class.
        /// </summary>
        /// <param name="info">
        /// The info.
        /// </param>
        /// <param name="context">
        /// The context.
        /// </param>
        /// <exception cref="ArgumentNullException"><paramref>
        ///         <name>name</name>
        ///     </paramref>
        ///     is null. </exception>
        /// <exception cref="InvalidCastException">The value associated with <paramref>
        ///         <name>name</name>
        ///     </paramref>
        ///     cannot be converted to a <see cref="T:System.String" />. </exception>
        /// <exception cref="SerializationException">An element with the specified name is not found in the current instance. </exception>
        // ReSharper disable once UnusedParameter.Local
        public MailChimpException(SerializationInfo info, StreamingContext context)
        {
            var errorText = string.Empty;

            try
            {
                this.Detail   = info?.GetString("detail");
                this.Title    = info?.GetString("title");
                this.Type     = info?.GetString("type");
                this.Status   = info?.GetInt32("status") ?? 0;
                this.Instance = info?.GetString("instance");

                errorText =
                    $"Title: {this.Title + Environment.NewLine} Type: {this.Type + Environment.NewLine} Status: {this.Status + Environment.NewLine} + Detail: {this.Detail + Environment.NewLine}";
                this.Errors = (List <Error>)info?.GetValue("errors", typeof(List <Error>));
                errorText  += "Errors: " + string.Join(" : ", this.Errors.Select(x => x.Field + " " + x.Message));
            }
            catch
            {
                // ignored
            }
            finally
            {
                Trace.Write(errorText);
                Debug.Write(errorText);
            }
        }
Example #32
0
 private Address(
     SerializationInfo info,
     StreamingContext context)
     : this(info?.GetValue <byte[]>("address") ??
            throw new SerializationException("Missing the address field."))
 {
 }
Example #33
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MailChimpException"/> class.
 /// </summary>
 /// <param name="info">
 /// The info.
 /// </param>
 /// <param name="context">
 /// The context.
 /// </param>
 /// <exception cref="ArgumentNullException"><paramref>
 ///         <name>name</name>
 ///     </paramref>
 ///     is null. </exception>
 /// <exception cref="InvalidCastException">The value associated with <paramref>
 ///         <name>name</name>
 ///     </paramref>
 ///     cannot be converted to a <see cref="T:System.String" />. </exception>
 /// <exception cref="SerializationException">An element with the specified name is not found in the current instance. </exception>
 // ReSharper disable once UnusedParameter.Local
 public MailChimpException(SerializationInfo info, StreamingContext context)
 {
     try
     {
         this.Detail   = info?.GetString("detail");
         this.Title    = info?.GetString("title");
         this.Type     = info?.GetString("type");
         this.Status   = info?.GetInt32("status") ?? 0;
         this.Instance = info?.GetString("instance");
         this.Errors   = (List <Error>)info?.GetValue("errors", typeof(List <Error>));
     }
     catch
     { }
 }
Example #34
0
 protected XZException(SerializationInfo info, StreamingContext ctx)
 {
     ReturnCode = (LzmaRet)info.GetValue(nameof(ReturnCode), typeof(LzmaRet));
 }
Example #35
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NodalLoad" /> class. satisfies the constrictor for <see cref="ISerializable" /> interface.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="context">The context.</param>
 private NodalLoad(SerializationInfo info, StreamingContext context)
 {
     force = (Force)info.GetValue("force", typeof(Force));
     _case = (LoadCase)info.GetValue("case", typeof(LoadCase));
 }
Example #36
0
 /// <summary>
 /// Constructor needed for serialization
 /// </summary>
 /// <param name="info">The SerializationInfo member</param>
 /// <param name="context">The StreamingContext member</param>
 protected Matrix2D(SerializationInfo info, StreamingContext context) : this()
 {
     _matrix = (double[])info.GetValue("Matrix", typeof(double[]));
 }
 public MyCustomFlash(SerializationInfo info, StreamingContext ctxt)
 {
     //dont think this is required.
     this.OcxState = (State)info.GetValue("ocxstate", typeof(State));
 }
Example #38
0
 /// <summary>
 /// Initializes a new instance of the <see cref="sPixel"/> struct by deserializing it.
 /// </summary>
 /// <param name="serializationInfo">The serialization info.</param>
 /// <param name="_">The streaming context.</param>
 public sPixel(SerializationInfo serializationInfo, StreamingContext _)
 {
     this._argbBytes = (dword)serializationInfo.GetValue("value", typeof(dword));
 }
Example #39
0
            public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
            {
                string @string = info.GetString("type");
                Type   type    = Type.GetType(@string, throwOnError: false);

                if (type == null)
                {
                    throw new KeyNotFoundException("Could not load type " + @string);
                }
                int num = (int)info.GetValue("rank", typeof(int));

                if (num <= 0 || num > 4)
                {
                    Debug.LogError((object)"ArrayRank out of range (1-4) in serialized array - not recieved");
                    return(null);
                }
                int num2 = 1;

                int[] array = new int[4]
                {
                    1,
                    1,
                    1,
                    1
                };
                for (int i = 0; i < num; i++)
                {
                    array[i] = (int)info.GetValue("dim_" + i.ToString(), typeof(int));
                    num2    *= array[i];
                }
                if (num2 > 65536)
                {
                    Debug.LogError((object)"Too many elements in serialized array - not received");
                    return(null);
                }
                Array array2 = Array.CreateInstance(type.GetElementType(), array);

                int[] array3 = new int[num];
                for (int j = 0; j < array[3]; j++)
                {
                    if (num > 3)
                    {
                        array3[3] = j;
                    }
                    for (int k = 0; k < array[2]; k++)
                    {
                        if (num > 2)
                        {
                            array3[2] = k;
                        }
                        for (int l = 0; l < array[1]; l++)
                        {
                            if (num > 1)
                            {
                                array3[1] = l;
                            }
                            for (int m = 0; m < array[0]; m++)
                            {
                                array3[0] = m;
                                byte[] dataParameters = (byte[])info.GetValue("elem_" + m + "." + l + "." + k + "." + j, typeof(byte[]));
                                object value          = ParameterDecoder(dataParameters);
                                array2.SetValue(Convert.ChangeType(value, type.GetElementType()), array3);
                            }
                        }
                    }
                }
                return(array2);
            }
Example #40
0
 /// <summary>
 /// Creates a new <see cref="CommandFrame"/> from serialization parameters.
 /// </summary>
 /// <param name="info">The <see cref="SerializationInfo"/> with populated with data.</param>
 /// <param name="context">The source <see cref="StreamingContext"/> for this deserialization.</param>
 protected CommandFrame(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     // Deserialize command frame
     m_frameHeader = (CommonFrameHeader)info.GetValue("frameHeader", typeof(CommonFrameHeader));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StepEquals"/> class.
 /// This is used only for binary deserialization.
 /// </summary>
 /// <param name="info">The info <see cref="SerializationInfo"/>.</param>
 /// <param name="context">The context <see cref="StreamingContext"/>.</param>
 public StepEquals(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     this.desiredValue = (string)info.GetValue(nameof(this.desiredValue), typeof(string));
 }
        protected Foo(SerializationInfo info, StreamingContext context) // Noncompliant {{Secure this serialization constructor.}}
//                ^^^
        {
            n = (int)info.GetValue("n", typeof(int));
        }
Example #43
0
 protected Plane(SerializationInfo info, StreamingContext context) : this((Coordinate)info.GetValue("Normal", typeof(Coordinate)), info.GetDecimal("DistanceFromOrigin"))
 {
 }
Example #44
0
 public ConvertVitalImpact(SerializationInfo info, StreamingContext context)
 {
     Percent     = info.GetValue(nameof(Percent), Percent);
     SourceVital = info.GetValue(nameof(SourceVital), SourceVital);
     TargetVital = info.GetValue(nameof(TargetVital), TargetVital);
 }
Example #45
0
        public FindCircle(SerializationInfo info, StreamingContext context)
        {
            InitializeComponent();
            this.cbb_measure_select.SelectedIndex = 0;
            this.cbb_transition.SelectedIndex     = 0;

            this.cbb_source1.SelectedIndex        = (Int32)(info.GetValue("Cbb_Source1", typeof(Int32)));
            this.comboBox1.SelectedIndex          = (Int32)(info.GetValue("Circle_color", typeof(Int32)));
            this.cbb_measure_select.SelectedIndex = (Int32)(info.GetValue("Cbb_Measure_Select", typeof(Int32)));
            this.cbb_transition.SelectedIndex     = (Int32)(info.GetValue("Cbb_Transition", typeof(Int32)));
            this.num_measure.Text       = (string)(info.GetValue("Num_measure", typeof(string)));
            this.measure_length1.Text   = (string)(info.GetValue("Measure_length1", typeof(string)));
            this.measure_length2.Text   = (string)(info.GetValue("Measure_length2", typeof(string)));
            this.measure_threshold.Text = (string)(info.GetValue("Measure_threshold", typeof(string)));
            xrow    = (double)(info.GetValue("Xrow", typeof(double)));
            xcol    = (double)(info.GetValue("Xcol", typeof(double)));
            xradius = (double)(info.GetValue("Xradius", typeof(double)));

            string out_image_string = (string)(info.GetValue("Image_string", typeof(string)));

            string[] condition = { "," };
            string[] result    = out_image_string.Split(condition, StringSplitOptions.None);
            this.tb_value1.Text      = (string)(info.GetValue("Tb_Value1", typeof(string)));
            this.textBox_radius.Text = (string)(info.GetValue("TbRadius", typeof(string)));
            for (int m = 0; m < result.Count(); m++)
            {
                Threshold_image.Items.Add(result[m]);
            }
            Threshold_image.SelectedIndex = (Int32)(info.GetValue("Input_image", typeof(Int32)));
            if ((string)(info.GetValue("HandCircle", typeof(string))) == "True")
            {
                this.checkBox_circle.Checked = true;
            }
            else
            {
                this.checkBox_circle.Checked = false;
            }
        }
Example #46
0
 protected HasIdDecoration(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     this.Id = (TId)info.GetValue("_id", typeof(TId));
 }
 public ScopedData(SerializationInfo info, StreamingContext context)
 {
     ScopedDatas = info.GetValue("ScopedDatas", typeof(ObservableCollection <Data>)) as ObservableCollection <Data>;
 }
Example #48
0
 protected BoxF(SerializationInfo info, StreamingContext context)
 {
     Start  = (CoordinateF)info.GetValue("Start", typeof(CoordinateF));
     End    = (CoordinateF)info.GetValue("End", typeof(CoordinateF));
     Center = (Start + End) / 2;
 }
 protected EasFolderCreateFailedTransientException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     this.errorMessage = (string)info.GetValue("errorMessage", typeof(string));
 }
Example #50
0
 /// <summary>
 /// Creates a new <see cref="IdSpan"/> instance from the provided value.
 /// </summary>
 private IdSpan(SerializationInfo info, StreamingContext context)
 {
     _value    = (byte[])info.GetValue("v", typeof(byte[]));
     _hashCode = info.GetInt32("h");
 }
Example #51
0
 protected Route(SerializationInfo info, StreamingContext context)
     : this(false,
            info?.GetValue <ValueT[]>(nameof(nodes)),
            info?.GetSingle(nameof(Cost)) ?? throw new ArgumentNullException(nameof(info)))
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WrongClassException"/> class
 /// with serialized data.
 /// </summary>
 /// <param name="info">
 /// The <see cref="SerializationInfo"/> that holds the serialized object
 /// data about the exception being thrown.
 /// </param>
 /// <param name="context">
 /// The <see cref="StreamingContext"/> that contains contextual information about the source or destination.
 /// </param>
 protected WrongClassException(SerializationInfo info, StreamingContext context) : base(info, context)
 {
     entityName = info.GetValue("entityName", typeof(string)) as string;
     identifier = info.GetValue("identifier", typeof(object));
 }
Example #53
0
 /// <summary>
 /// Constructor used to deserialize runtime serialized object
 /// </summary>
 /// <param name="info">The serialization info</param>
 /// <param name="context">The streaming context</param>
 public VectorOfDMatch(SerializationInfo info, StreamingContext context)
     : this()
 {
     Push((MDMatch[])info.GetValue("DMatchArray", typeof(MDMatch[])));
 }
Example #54
0
 public DialogNode(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     Speaker = info.GetValue <string>("speaker");
     Dialog  = info.GetValue <Expression>("dialog");
 }
Example #55
0
 private UndirectedBidirectionalGraph(SerializationInfo info, StreamingContext context)
     : this((IBidirectionalGraph <TVertex, TEdge>)info.GetValue("OriginalGraph", typeof(IBidirectionalGraph <TVertex, TEdge>)))
 {
 }
 public SerializableCDefect(SerializationInfo info, StreamingContext ctxt)
     : this()
 {
     this._defect.defectnumber          = (long)info.GetValue("defectnumber", typeof(long));
     this._defect.defectnumberSpecified = (bool)info.GetValue("defectnumberSpecified", typeof(bool));
     this._defect.summary     = (string)info.GetValue("summary", typeof(string));
     this._defect.state       = (string)info.GetValue("state", typeof(string));
     this._defect.disposition = (string)info.GetValue("disposition", typeof(string));
     this._defect.type        = (string)info.GetValue("type", typeof(string));
     this._defect.priority    = (string)info.GetValue("priority", typeof(string));
     this._defect.product     = (string)info.GetValue("product", typeof(string));
     this._defect.component   = (string)info.GetValue("component", typeof(string));
     this._defect.reference   = (string)info.GetValue("reference", typeof(string));
     this._defect.severity    = (string)info.GetValue("severity", typeof(string));
     this._defect.enteredby   = (string)info.GetValue("enteredby", typeof(string));
     this._defect.workaround  = (string)info.GetValue("workaround", typeof(string));
     this._defect.workaroundInlineAttachList = (CFileAttachment[])info.GetValue("workaroundInlineAttachList", typeof(CFileAttachment[]));
     this._defect.dateentered               = (DateTime)info.GetValue("dateentered", typeof(DateTime));
     this._defect.dateenteredSpecified      = (bool)info.GetValue("dateenteredSpecified", typeof(bool));
     this._defect.locationaddedfrom         = (string)info.GetValue("locationaddedfrom", typeof(string));
     this._defect.datetimecreated           = (DateTime)info.GetValue("datetimecreated", typeof(DateTime));
     this._defect.datetimecreatedSpecified  = (bool)info.GetValue("datetimecreatedSpecified", typeof(bool));
     this._defect.datetimemodified          = (DateTime)info.GetValue("datetimemodified", typeof(DateTime));
     this._defect.datetimemodifiedSpecified = (bool)info.GetValue("datetimemodifiedSpecified", typeof(bool));
     this._defect.createdbyuser             = (string)info.GetValue("createdbyuser", typeof(string));
     this._defect.modifiedbyuser            = (string)info.GetValue("modifiedbyuser", typeof(string));
     this._defect.actualhourstofix          = (double)info.GetValue("actualhourstofix", typeof(double));
     this._defect.actualhourstofixSpecified = (bool)info.GetValue("actualhourstofixSpecified", typeof(bool));
     this._defect.estimatedhours            = (double)info.GetValue("estimatedhours", typeof(double));
     this._defect.estimatedhoursSpecified   = (bool)info.GetValue("estimatedhoursSpecified", typeof(bool));
     this._defect.remaininghours            = (double)info.GetValue("remaininghours", typeof(double));
     this._defect.remaininghoursSpecified   = (bool)info.GetValue("remaininghoursSpecified", typeof(bool));
     this._defect.variance             = (double)info.GetValue("variance", typeof(double));
     this._defect.varianceSpecified    = (bool)info.GetValue("varianceSpecified", typeof(bool));
     this._defect.storypoints          = (long)info.GetValue("storypoints", typeof(long));
     this._defect.storypointsSpecified = (bool)info.GetValue("storypointsSpecified", typeof(bool));
     this._defect.percentdone          = (long)info.GetValue("percentdone", typeof(long));
     this._defect.percentdoneSpecified = (bool)info.GetValue("percentdoneSpecified", typeof(bool));
     this._defect.reportedbylist       = (CReportedByRecord[])info.GetValue("reportedbylist", typeof(CReportedByRecord[]));
     this._defect.eventlist            = (CEvent[])info.GetValue("eventlist", typeof(CEvent[]));
     this._defect.pSCCFileList         = (CSCCFileRecord[])info.GetValue("pSCCFileList", typeof(CSCCFileRecord[]));
     this._defect.customFieldList      = (CField[])info.GetValue("customFieldList", typeof(CField[]));
 }
Example #57
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NodeCollection"/> class.
 /// Satisfies rule: ImplementSerializationConstructors.
 /// </summary>
 /// <param name="info">The information.</param>
 /// <param name="context">The context.</param>
 protected NodeCollection(SerializationInfo info, StreamingContext context)
 {
     _list = (List <Node>)info.GetValue("_list", typeof(List <Node>));
 }
Example #58
0
        public Unit(SerializationInfo info, StreamingContext context)
        {
            this.m_subAssemblies = (List <FrameWorks.SubAssemblyBase>)info.GetValue("SubAssemblies", typeof(List <FrameWorks.SubAssemblyBase>));
            this.m_UnitID        = (Int32)info.GetValue("UnitID", typeof(Int32));
            this.m_unitName      = (string)info.GetValue("UnitName", typeof(string));
            this.m_unitWidth     = (decimal)info.GetValue("UnitWidth", typeof(decimal));
            this.m_unitHeight    = (decimal)info.GetValue("UnitHeight", typeof(decimal));
            this.m_unitDepth     = (decimal)info.GetValue("UnitDepth", typeof(decimal));
            // Need renaming and revision
            this.m_projectInstanceName = (string)info.GetValue("ProjectInstanceName", typeof(string));
            this.m_varDecimalOne       = (decimal)info.GetValue("VarDecimalOne", typeof(decimal));

            this.m_MakeFileName   = (string)info.GetValue("MakeFileName", typeof(string));
            this.m_calculatedCost = (decimal)info.GetValue("CalculatedCost", typeof(decimal));
            this.m_area           = (decimal)info.GetValue("Area", typeof(decimal));
        }
        private Result(SerializationInfo info, StreamingContext context)
        {
            _logic = ResultCommonLogic <string> .Deserialize(info);

            _value = _logic.IsFailure ? default : (T)info.GetValue("Value", typeof(T));
        }
 /// <summary>
 /// Serialization constructor.
 /// </summary>
 /// <param name="info">Stores all the data needed to serialize or deserialize an object.</param>
 /// <param name="context">Describes the source and destination of a given serialized stream, and provides an additional caller-defined context.</param>
 protected RmBinary(
     SerializationInfo info,
     StreamingContext context)
 {
     this.value = (byte[])info.GetValue("value", typeof(byte[]));
 }