Exemplo n.º 1
0
        public TimingPoint(SerializationInfo info, StreamingContext ctxt)
        {
            SerializationReader sr = SerializationReader.GetReader(info);

            beatLength = sr.ReadDouble();
            offset     = sr.ReadDouble();
        }
Exemplo n.º 2
0
        internal Score(SerializationInfo info, StreamingContext ctxt)
        {
            SerializationReader sr = SerializationReader.GetReader(info);

            pass = true;

            fileChecksum = sr.ReadString();
            playerName   = sr.ReadString();
            string scoreChecksumCheck = sr.ReadString();

            count300            = sr.ReadUInt16();
            count100            = sr.ReadUInt16();
            count50             = sr.ReadUInt16();
            countGeki           = sr.ReadUInt16();
            countKatu           = sr.ReadUInt16();
            countMiss           = sr.ReadUInt16();
            totalScore          = sr.ReadInt32();
            maxCombo            = sr.ReadUInt16();
            perfect             = sr.ReadBoolean();
            enabledMods         = (Mods)sr.ReadInt32();
            rawGraph            = sr.ReadString();
            rawReplayCompressed = sr.ReadByteArray();
            date = sr.ReadDateTime();

            if (scoreChecksumCheck != offlineScoreChecksum)
            {
                throw new Exception("f****d score");
            }
        }
Exemplo n.º 3
0
        public ForecastItem(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            AccountId    = reader.ReadString();
            Amount       = reader.ReadInt64();
            CategoryId   = reader.ReadString();
            CategoryName = reader.ReadString();
            Date         = reader.ReadDateTime();
            if (reader.ReadBoolean())
            {
                FlagColor = (FlagColor)reader.ReadByte();
            }
            ForecastItemType          = (ForecastItemType)reader.ReadByte();
            Funded                    = reader.ReadInt64();
            IsSplit                   = reader.ReadBoolean();
            Memo                      = reader.ReadString();
            PayeeId                   = reader.ReadString();
            PayeeName                 = reader.ReadString();
            ScheduledSubTransactionId = reader.ReadString();
            ScheduledTransactionId    = reader.ReadString();
            SubTransactionId          = reader.ReadString();
            TransactionId             = reader.ReadString();
            TransferAccountId         = reader.ReadString();
        }
Exemplo n.º 4
0
        public Category(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            Activity          = reader.ReadInt64();
            Balance           = reader.ReadInt64();
            Budgeted          = reader.ReadInt64();
            CategoryGroupId   = reader.ReadString();
            CategoryId        = reader.ReadString();
            Deleted           = reader.ReadBoolean();
            Hidden            = reader.ReadBoolean();
            GoalCreationMonth = reader.ReadString();
            if (reader.ReadBoolean())
            {
                GoalPercentageComplete = reader.ReadInt32();
            }
            GoalTarget      = reader.ReadInt64();
            GoalTargetMonth = reader.ReadString();
            if (reader.ReadBoolean())
            {
                GoalType = (GoalType)reader.ReadByte();
            }
            Name = reader.ReadString();
            Note = reader.ReadString();
            OriginalCategoryGroupId = reader.ReadString();
        }
Exemplo n.º 5
0
        public MonthDetail(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            if (reader.ReadBoolean())
            {
                Activity = reader.ReadInt64();
            }
            if (reader.ReadBoolean())
            {
                AgeOfMoney = reader.ReadInt64();
            }
            if (reader.ReadBoolean())
            {
                Budgeted = reader.ReadInt64();
            }
            Categories = reader.ReadList <Category>();
            if (reader.ReadBoolean())
            {
                Income = reader.ReadInt64();
            }
            Month = reader.ReadDateTime();
            Note  = reader.ReadString();
            if (reader.ReadBoolean())
            {
                ToBeBudgeted = reader.ReadInt64();
            }
        }
Exemplo n.º 6
0
        public TraceHelper(SerializationInfo info, StreamingContext ctxt)
        {
            SerializationReader sr = SerializationReader.GetReader(info);

            MZHigh = sr.ReadDouble();
            MZLow  = sr.ReadDouble();
            Points = sr.ReadList <TracePoint>().ToList();
        }
Exemplo n.º 7
0
        public CategoryGroup(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            CategoryGroupId = reader.ReadString();
            Deleted         = reader.ReadBoolean();
            Hidden          = reader.ReadBoolean();
            Name            = reader.ReadString();
        }
Exemplo n.º 8
0
        public Payee(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            Deleted           = reader.ReadBoolean();
            Name              = reader.ReadString();
            PayeeId           = reader.ReadString();
            TransferAccountId = reader.ReadString();
        }
Exemplo n.º 9
0
        protected CommandModel(SerializationInfo info, StreamingContext ctx)
        {
            SerializationReader sr = SerializationReader.GetReader(info);

            SetObjectData(sr);

            _FrontendManager = (FrontendManager)info.GetValue("_FrontendManager", typeof(FrontendManager));
            _Chat            = (ChatModel)info.GetValue("_Chat", typeof(ChatModel));
        }
Exemplo n.º 10
0
        public Path(SerializationInfo info, StreamingContext ctxt)
        {
            var Reader = SerializationReader.GetReader(info);

            MinScale = Reader.ReadSingle();
            MaxScale = Reader.ReadSingle();
            var Triangles = Reader.ReadList <Triangle <TriangleVertexData> >((a) => a.ReadTriangle()).ToList();

            Mesh = new Mesh <TriangleVertexData>(Triangles);
        }
Exemplo n.º 11
0
        public PayeeLocation(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            Deleted         = reader.ReadBoolean();
            Latitude        = reader.ReadString();
            Longitude       = reader.ReadString();
            PayeeId         = reader.ReadString();
            PayeeLocationId = reader.ReadString();
        }
Exemplo n.º 12
0
        public FundItem(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            Amount       = reader.ReadInt64();
            CategoryId   = reader.ReadString();
            CategoryName = reader.ReadString();
            Date         = reader.ReadDateTime();
            Payee        = reader.ReadString();
        }
Exemplo n.º 13
0
        public Beatmap(SerializationInfo info, StreamingContext ctxt)
        {
            SerializationReader sr = SerializationReader.GetReader(info);

            Artist                     = sr.ReadString();
            Title                      = sr.ReadString();
            Creator                    = sr.ReadString();
            Version                    = sr.ReadString();
            AudioFilename              = sr.ReadString();
            BeatmapChecksum            = sr.ReadString();
            Filename                   = sr.ReadString();
            submissionStatus           = (SubmissionStatus)sr.ReadByte();
            countNormal                = sr.ReadUInt16();
            countSlider                = sr.ReadUInt16();
            countSpinner               = sr.ReadUInt16();
            DateModified               = sr.ReadDateTime();
            DifficultyCircleSize       = sr.ReadByte();
            DifficultyHpDrainRate      = sr.ReadByte();
            DifficultyOverall          = sr.ReadByte();
            DifficultySliderMultiplier = sr.ReadDouble();
            DrainLength                = sr.ReadInt32();
            TotalLength                = sr.ReadInt32();
            PreviewTime                = sr.ReadInt32();
            TimingPoints               = (List <TimingPoint>)sr.ReadList <TimingPoint>();
            BeatmapId                  = sr.ReadInt32();
            BeatmapSetId               = sr.ReadInt32();
            BeatmapTopicId             = sr.ReadInt32();
            if (BeatmapManager.DatabaseVersion >= 361)
            {
                PlayerRank   = (Rankings)sr.ReadByte();
                PlayerOffset = sr.ReadInt16();
            }
            if (BeatmapManager.DatabaseVersion >= 365)
            {
                StackLeniency = sr.ReadSingle();
            }
            if (BeatmapManager.DatabaseVersion >= 372)
            {
                Mode = sr.ReadByte();
            }
            if (BeatmapManager.DatabaseVersion >= 374)
            {
                Source = sr.ReadString();
                Tags   = sr.ReadString();
            }

            ObjectCount      = countNormal + countSpinner + countSlider;
            BeatmapPresent   = true;
            AudioPresent     = true;
            ContainingFolder = Path.GetDirectoryName(Filename);
            DatabaseNotFound = true;

            PopulateTitleStatics();
        }
Exemplo n.º 14
0
        protected ContactModel(SerializationInfo info, StreamingContext ctx)
        {
            if (info == null)
            {
                throw new ArgumentNullException("info");
            }

            SerializationReader sr = SerializationReader.GetReader(info);

            SetObjectData(sr);
        }
Exemplo n.º 15
0
        public TracePoint(SerializationInfo info, StreamingContext ctxt)
        {
            SerializationReader sr = SerializationReader.GetReader(info);

            MZ         = sr.ReadDouble();
            RT         = sr.ReadSingle();
            Intensity  = sr.ReadSingle();
            ScanNumber = sr.ReadInt32(); //jlin
            Charge     = sr.ReadInt32();
            IsFullScan = sr.ReadBoolean();
        }
        public ProjectedSpendingScenario(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            AccountId     = reader.ReadString();
            Amount        = reader.ReadInt64();
            CategoryId    = reader.ReadString();
            Days          = reader.ReadList <int>();
            IsEnabled     = reader.ReadBoolean();
            IsExactAmount = reader.ReadBoolean();
            ScenarioId    = reader.ReadString();
        }
Exemplo n.º 17
0
        public SubTransaction(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            Amount            = reader.ReadInt64();
            CategoryId        = reader.ReadString();
            Deleted           = reader.ReadBoolean();
            Memo              = reader.ReadString();
            PayeeId           = reader.ReadString();
            SubTransactionId  = reader.ReadString();
            TransactionId     = reader.ReadString();
            TransferAccountId = reader.ReadString();
        }
Exemplo n.º 18
0
        public ScheduledTransactionScenario(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            Amount                 = reader.ReadInt64();
            BeginDate              = reader.ReadDateTime();
            EndDate                = reader.ReadDateTime();
            Frequency              = (Frequency)reader.ReadByte();
            IsEnabled              = reader.ReadBoolean();
            IsExactAmount          = reader.ReadBoolean();
            ScenarioId             = reader.ReadString();
            ScheduledTransactionId = reader.ReadString();
        }
Exemplo n.º 19
0
        public MessageModel(MessageModel msg) : this()
        {
            if (msg == null)
            {
                throw new ArgumentNullException("msg");
            }

            var writer = SerializationWriter.GetWriter();

            msg.GetObjectData(writer);
            var data   = writer.GetData();
            var reader = SerializationReader.GetReader(data);

            SetObjectData(reader);
        }
Exemplo n.º 20
0
        public Account(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            AccountId        = reader.ReadString();
            Balance          = reader.ReadInt64();
            ClearedBalance   = reader.ReadInt64();
            Closed           = reader.ReadBoolean();
            Deleted          = reader.ReadBoolean();
            Name             = reader.ReadString();
            Note             = reader.ReadString();
            OnBudget         = reader.ReadBoolean();
            TransferPayeeId  = reader.ReadString();
            Type             = (AccountType)reader.ReadByte();
            UnclearedBalance = reader.ReadInt64();
        }
        public ScheduledTransactionSummary(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            AccountId  = reader.ReadString();
            Amount     = reader.ReadInt64();
            CategoryId = reader.ReadString();
            DateFirst  = reader.ReadDateTime();
            DateNext   = reader.ReadDateTime();
            Deleted    = reader.ReadBoolean();
            if (reader.ReadBoolean())
            {
                FlagColor = (FlagColor)reader.ReadByte();
            }
            Frequency = (Frequency)reader.ReadByte();
            Memo      = reader.ReadString();
            PayeeId   = reader.ReadString();
            ScheduledTransactionId = reader.ReadString();
            TransferAccountId      = reader.ReadString();
        }
Exemplo n.º 22
0
        public TransactionSummary(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            AccountId  = reader.ReadString();
            Amount     = reader.ReadInt64();
            Approved   = reader.ReadBoolean();
            CategoryId = reader.ReadString();
            Cleared    = (TransactionStatus)reader.ReadByte();
            Date       = reader.ReadDateTime();
            Deleted    = reader.ReadBoolean();
            if (reader.ReadBoolean())
            {
                FlagColor = (FlagColor)reader.ReadByte();
            }
            ImportId              = reader.ReadString();
            Memo                  = reader.ReadString();
            PayeeId               = reader.ReadString();
            TransactionId         = reader.ReadString();
            TransferAccountId     = reader.ReadString();
            TransferTransactionId = reader.ReadString();
        }
Exemplo n.º 23
0
        public BudgetDetail(SerializationInfo info, StreamingContext context)
        {
            var reader = SerializationReader.GetReader(info);

            Accounts                 = reader.ReadList <Account>();
            BudgetId                 = reader.ReadString();
            Categories               = reader.ReadList <Category>();
            CategoryGroups           = reader.ReadList <CategoryGroup>();
            CurrencyFormat           = (CurrencyFormat)reader.ReadObject();
            DateFormat               = (DateFormat)reader.ReadObject();
            FirstMonth               = reader.ReadString();
            LastModifiedOn           = reader.ReadDateTime();
            LastMonth                = reader.ReadString();
            Months                   = reader.ReadList <MonthDetail>();
            Name                     = reader.ReadString();
            PayeeLocations           = reader.ReadList <PayeeLocation>();
            Payees                   = reader.ReadList <Payee>();
            ScheduledSubTransactions = reader.ReadList <ScheduledSubTransaction>();
            ScheduledTransactions    = reader.ReadList <ScheduledTransactionSummary>();
            SubTransactions          = reader.ReadList <SubTransaction>();
            Transactions             = reader.ReadList <TransactionSummary>();
        }
Exemplo n.º 24
0
        //Deserialization constructor
        public Vector3f(SerializationInfo info, StreamingContext ctxt)
        {
            SerializationReader sr = SerializationReader.GetReader(info);

            nXYZ = sr.ReadFloatArray();
        }
Exemplo n.º 25
0
        protected MessageModel(SerializationInfo info, StreamingContext ctx)
        {
            SerializationReader sr = SerializationReader.GetReader(info);

            SetObjectData(sr);
        }
Exemplo n.º 26
0
        //Deserialization constructor
        public Point3f(SerializationInfo info, StreamingContext ctxt)
        {
            SerializationReader sr = SerializationReader.GetReader(info);

            nxyz = sr.ReadFloatArray();
        }
Exemplo n.º 27
0
        protected TextColor(SerializationInfo info, StreamingContext ctx)
        {
            SerializationReader sr = SerializationReader.GetReader(info);

            SetObjectData(sr);
        }