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


C# SerializationInfo.GetDecimal方法代码示例

本文整理汇总了C#中System.Runtime.Serialization.SerializationInfo.GetDecimal方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationInfo.GetDecimal方法的具体用法?C# SerializationInfo.GetDecimal怎么用?C# SerializationInfo.GetDecimal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Runtime.Serialization.SerializationInfo的用法示例。


在下文中一共展示了SerializationInfo.GetDecimal方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Boat

        public Boat(SerializationInfo info, StreamingContext ctxt)
        {
            date = info.GetDateTime("date");
            boatName = (boatType)info.GetValue("boatName",typeof(boatType));
            sailTime = info.GetString("sailTime");
            bankOut = info.GetDecimal("bankOut");

            pkgsOut = info.GetInt32("pkgsOut");
            pkgsNotViewed = info.GetInt32("pkgsNotViewed");
            pkgsViewedNS = info.GetInt32("pkgsViewedNS");

            clicker = info.GetInt32("clicker");
            headcount = info.GetInt32("headcount");
            paxCount = info.GetInt32("paxCount");

            AllInVal = info.GetDecimal("AllInVal");
            BaseVal = info.GetDecimal("BaseVal");
            AcrylOnlyVal = info.GetDecimal("AcrylOnlyVal");

            sold_allIn = info.GetInt32("sold_allIn");
            sold_baseOnly = info.GetInt32("sold_baseOnly");
            sold_acrylicOnly = info.GetInt32("sold_acrylicOnly");
            sold_reprint_allIn = info.GetInt32("sold_reprint_allIn");
            sold_reprint_Base = info.GetInt32("sold_reprint_Base");
            sold_acrylicAddOn = info.GetInt32("sold_acrylicAddOn");
            missingPackages = info.GetInt32("missingPackages");

            pkgsSold = info.GetInt32("pkgsSold");
            pkgsNotSold = info.GetInt32("pkgsNotSold");

            otherPrints = info.GetInt32("otherPrints");
            otherValue = info.GetDecimal("otherValue");

            override_AllInCount = info.GetBoolean("override_AllInCount");
            override_CashAmt = info.GetBoolean("override_AllInCount");

            inBank = (Bank)info.GetValue("inBank",typeof(Bank));
            depositBank = (Bank)info.GetValue("depositBank", typeof(Bank));

            expectedTotal = info.GetDecimal("expectedTotal");
            actualTotal = info.GetDecimal("actualTotal");
            grossTotal = info.GetDecimal("grossTotal");
            netProfit = info.GetDecimal("netProfit");
            perCap = info.GetDecimal("perCap");

            amEx = (NonCashAsset)info.GetValue("amEx",typeof(NonCashAsset));
            visa = (NonCashAsset)info.GetValue("visa", typeof(NonCashAsset));
            mastercard = (NonCashAsset)info.GetValue("mastercard", typeof(NonCashAsset));
            discover = (NonCashAsset)info.GetValue("discover", typeof(NonCashAsset));
            directBill = (NonCashAsset)info.GetValue("directBill", typeof(NonCashAsset));
            personalCheck = (NonCashAsset)info.GetValue("personalCheck", typeof(NonCashAsset));

            notes = info.GetString("notes");
            employeeInitials = info.GetString("employeeInitials");

            isLocked = info.GetBoolean("isLocked");
        }
开发者ID:JDiPierro,项目名称:BoatSheet,代码行数:57,代码来源:Boat.cs

示例2: QLearned

 public QLearned(SerializationInfo info, StreamingContext context)
 {
     algo = info.GetString("algo");
     state = info.GetString("state");
     learn = info.GetDecimal("learn");
     discount = info.GetDecimal("discount");
     explore = info.GetDecimal("explore");
     trials = info.GetInt32("trials");
     contents = info.GetValue("contents", typeof(object));
 }
开发者ID:vkarthi46,项目名称:QLearner,代码行数:10,代码来源:QLearned.cs

示例3: DefaultType

 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultType"/> class.
 /// </summary>
 /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> from which to create a new instance.</param>
 /// <param name="context">The source (see <see cref="T:System.Runtime.Serialization.StreamingContext"/>) for this serialization.</param>
 public DefaultType(SerializationInfo info, StreamingContext context)
 {
     Name = info.GetString("Name");
     Format = (Format) info.GetValue("Format", typeof(Format));
     Manufacturer = info.GetString("Manufacturer");
     Volume = info.GetDecimal("Volume");
 }
开发者ID:m1ch4ls,项目名称:microplate,代码行数:12,代码来源:DefaultType.cs

示例4: EmployeeDayTimeResult

 protected EmployeeDayTimeResult(SerializationInfo info, StreamingContext context)
 {
     _contractBegin = info.GetDateTime("cb");
     _contractEnd = info.GetDateTime("ce");
     _coefficient = info.GetDecimal("dt");
     _employeeID = info.GetInt64("em");
 }
开发者ID:5509850,项目名称:baumax,代码行数:7,代码来源:EmployeeDayTimeResult.cs

示例5: Output

 protected Output(SerializationInfo info, StreamingContext context)
 {
     Name = info.GetString("Name");
     Target = info.GetString("Target");
     Input = info.GetString("Input");
     Parameter = info.GetString("Parameter");
     Delay = info.GetDecimal("Delay");
     OnceOnly = info.GetBoolean("OnceOnly");
 }
开发者ID:silky,项目名称:sledge,代码行数:9,代码来源:Output.cs

示例6: Map

 protected Map(SerializationInfo info, StreamingContext context)
 {
     Version = info.GetDecimal("Version");
     Visgroups = ((Visgroup[]) info.GetValue("Visgroups", typeof (Visgroup[]))).ToList();
     Cameras = ((Camera[]) info.GetValue("Cameras", typeof (Camera[]))).ToList();
     var activeCamera = info.GetInt32("ActiveCameraID");
     ActiveCamera = activeCamera >= 0 ? Cameras[activeCamera] : null;
     WorldSpawn = (World) info.GetValue("WorldSpawn", typeof (World));
     IDGenerator = (IDGenerator) info.GetValue("IDGenerator", typeof (IDGenerator));
 }
开发者ID:silky,项目名称:sledge,代码行数:10,代码来源:Map.cs

示例7: DisplacementPoint

 protected DisplacementPoint(SerializationInfo info, StreamingContext context)
 {
     XIndex = info.GetInt32("XIndex");
     YIndex = info.GetInt32("YIndex");
     CurrentPosition = (Vertex) info.GetValue("CurrentPosition", typeof (Vertex));
     InitialPosition = (Coordinate) info.GetValue("InitialPosition", typeof (Coordinate));
     Displacement = (Vector) info.GetValue("Displacement", typeof (Vector));
     OffsetDisplacement = (Vector) info.GetValue("OffsetDisplacement", typeof (Vector));
     Alpha = info.GetDecimal("Alpha");
 }
开发者ID:silky,项目名称:sledge,代码行数:10,代码来源:DisplacementPoint.cs

示例8: Displacement

 protected Displacement(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     Power = info.GetInt32("Power");
     StartPosition = (Coordinate) info.GetValue("StartPosition", typeof (Coordinate));
     Elevation = info.GetDecimal("Elevation");
     SubDiv = info.GetBoolean("SubDiv");
     Points = (DisplacementPoint[,]) info.GetValue("Points", typeof (DisplacementPoint[,]));
     Points.OfType<DisplacementPoint>().ToList().ForEach(x => x.Parent = this);
 }
开发者ID:silky,项目名称:sledge,代码行数:10,代码来源:Displacement.cs

示例9: SetObjectData

 public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
 {
     var orderDetail = (OrderDetail)obj;
     orderDetail.OrderID = info.GetInt32("OrderID");
     orderDetail.ProductID = info.GetInt32("ProductID");
     orderDetail.UnitPrice = info.GetDecimal("UnitPrice");
     orderDetail.Quantity = info.GetInt16("Quantity");
     orderDetail.Discount = info.GetSingle("Discount");
     orderDetail.Order = (Order)info.GetValue("Order", typeof(Order));
     orderDetail.Product = (Product)info.GetValue("Product", typeof(Product));
     return orderDetail;
 }
开发者ID:VictorGavrish,项目名称:MentoringD2D3,代码行数:12,代码来源:OrderDetailsSerializationSurrogate.cs

示例10: Invoice

 public Invoice(SerializationInfo info, StreamingContext context)
 {
     m_sInvoiceID = info.GetString("InvoiceID");
     m_iIAJobID = info.GetInt32("IAJobID");
     m_sCustomerID = info.GetString("CustomerID");
     m_sInvoiceNumber = info.GetString("InvoiceNumber");
     m_oDueDateTime = info.GetDateTime("DueDateTime");
     m_fAmount = info.GetDecimal("Amount");
     m_sFilename = info.GetString("Filename");
     m_bIsEmail = info.GetBoolean("IsEmail");
     m_sEmailSubject = info.GetString("EmailSubject");
     m_sEmailBody = info.GetString("EmailBody");
 }
开发者ID:psychotiic,项目名称:speedyspots,代码行数:13,代码来源:Invoice.cs

示例11: SetObjectData

        public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
        {
            var orderDetail = (Order_Detail) obj;

            orderDetail.OrderID = info.GetInt32(MemberNameHelper.GetPropertyName<Order_Detail, int>(p => p.OrderID));
            orderDetail.ProductID = info.GetInt32(MemberNameHelper.GetPropertyName<Order_Detail, int>(p => p.ProductID));
            orderDetail.UnitPrice = info.GetDecimal(MemberNameHelper.GetPropertyName<Order_Detail, decimal>(p => p.UnitPrice));
            orderDetail.Quantity = info.GetInt16(MemberNameHelper.GetPropertyName<Order_Detail, short>(p => p.Quantity));
            orderDetail.Discount = info.GetSingle(MemberNameHelper.GetPropertyName<Order_Detail, float>(p => p.Discount));
            orderDetail.Product = (Product) info.GetValue(MemberNameHelper.GetPropertyName<Order_Detail, Product>(p => p.Product), typeof(Product));
            orderDetail.Order = (Order) info.GetValue(MemberNameHelper.GetPropertyName<Order_Detail, Order>(p => p.Order), typeof (Order));

            return orderDetail;
        }
开发者ID:RamanBut-Husaim,项目名称:.NET-Practice,代码行数:14,代码来源:OrderDetailSerializationSurrogate.cs

示例12: OrderExecutionSourceClientStub

 /// <summary>
 /// 
 /// </summary>
 public OrderExecutionSourceClientStub(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     ChangeOperationalState(OperationalStateEnum.Constructed);
     StatusSynchronizationEnabled = true;
     _sourceId = (ComponentId)info.GetValue("sourceId", typeof(ComponentId));
     try
     {
         _slippageMultiplicator = info.GetDecimal("slippageMultiplicator");
     }
     catch (SerializationException)
     {
         _slippageMultiplicator = 1;
     }
 }
开发者ID:redrhino,项目名称:DotNetConnectTerminal,代码行数:18,代码来源:OrderExecutionSourceClientStub.cs

示例13: Settings

        public Settings(SerializationInfo info, StreamingContext context)
        {
            saintAllInVal = info.GetDecimal("saintAllInVal");
            saintBaseVal = info.GetDecimal("saintBaseVal");
            saintAcrylOnlyVal = info.GetDecimal("saintAcrylOnlyVal");

            minmoAllInVal = info.GetDecimal("minmoAllInVal");
            minmoBaseVal = info.GetDecimal("minmoBaseVal");
            minmoAcrylOnlyVal = info.GetDecimal("minmoAcrylOnlyVal");

            addOnAcrylVal = info.GetDecimal("addOnAcrylVal");

            lastSaveLoc = info.GetString("lastSaveLoc");

            defaultSaveLoc = info.GetString("defaultSaveLoc");
        }
开发者ID:JDiPierro,项目名称:BoatSheet,代码行数:16,代码来源:Settings.cs

示例14: Bank

        public Bank(SerializationInfo info, StreamingContext ctxt)
        {
            numQuarters = info.GetInt32("numQuarters");
            numQuarterRolls = info.GetInt32("numQuarterRolls");
            numNickels = info.GetInt32("numNickels");
            numNickelRolls = info.GetInt32("numNickelRolls");
            numDimes = info.GetInt32("numDimes");
            numDimeRolls = info.GetInt32("numDimeRolls");
            numPennies = info.GetInt32("numPennies");
            numPennyRolls = info.GetInt32("numPennyRolls");

            numOnes = info.GetInt32("numOnes");
            numFives = info.GetInt32("numFives");
            numTens = info.GetInt32("numTens");
            numTwenties = info.GetInt32("numTwenties");
            numFifties = info.GetInt32("numFifties");
            numHundreds = info.GetInt32("numHundreds");
            totalBank = info.GetDecimal("totalBank");
        }
开发者ID:JDiPierro,项目名称:BoatSheet,代码行数:19,代码来源:Bank.cs

示例15: SetObjectData

        private void SetObjectData(SerializationInfo info)
        {
            this.ProductID = info.GetInt32(nameof(this.ProductID));
            this.ProductName = info.GetString(nameof(this.ProductName));
            this.SupplierID = (int?)info.GetValue(nameof(this.SupplierID), typeof(int?));
            this.CategoryID = (int?)info.GetValue(nameof(this.CategoryID), typeof(int?));
            this.QuantityPerUnit = info.GetString(nameof(this.QuantityPerUnit));
            this.UnitPrice = (decimal?)info.GetValue(nameof(this.UnitPrice), typeof(decimal?));
            this.UnitsInStock = (short?)info.GetValue(nameof(this.UnitsInStock), typeof(short?));
            this.ReorderLevel = (short?)info.GetValue(nameof(this.UnitsOnOrder), typeof(short?));
            this.Discontinued = info.GetBoolean(nameof(this.Discontinued));

            if (!info.GetBoolean(nameof(this.Category) + "IsNull"))
            {
                this.Category = new Category
                {
                    CategoryID = info.GetInt32(nameof(this.Category) + nameof(this.Category.CategoryID)),
                    CategoryName = info.GetString(nameof(this.Category) + nameof(this.Category.CategoryName)),
                    Description = info.GetString(nameof(this.Category) + nameof(this.Category.Description)),
                    Picture = (byte[])info.GetValue(nameof(this.Category) + nameof(this.Category.Picture), typeof(byte[]))
                };
            }

            var orderDetailsList = new List<OrderDetail>();

            for (var index = 0; index < info.GetInt32("orderDetailsCount"); index++)
            {
                var orderDetail = new OrderDetail
                {
                    OrderID = info.GetInt32($"{nameof(this.OrderDetails)}-{index}-{nameof(OrderDetail.OrderID)}"),
                    ProductID = info.GetInt32($"{nameof(this.OrderDetails)}-{index}-{nameof(OrderDetail.ProductID)}"),
                    UnitPrice = info.GetDecimal($"{nameof(this.OrderDetails)}-{index}-{nameof(OrderDetail.UnitPrice)}"),
                    Quantity = info.GetInt16($"{nameof(this.OrderDetails)}-{index}-{nameof(OrderDetail.Quantity)}"),
                    Discount = (float)info.GetValue($"{nameof(this.OrderDetails)}-{index}-{nameof(OrderDetail.Discount)}", typeof(float))
                };
                orderDetailsList.Add(orderDetail);
            }

            this.OrderDetails = orderDetailsList;

            if (!info.GetBoolean(nameof(this.Supplier) + "IsNull"))
            {
                this.Supplier = new Supplier
                {
                    SupplierID = info.GetInt32(nameof(this.Supplier) + nameof(this.Supplier.SupplierID)),
                    CompanyName = info.GetString(nameof(this.Supplier) + nameof(this.Supplier.CompanyName)),
                    ContactName = info.GetString(nameof(this.Supplier) + nameof(this.Supplier.ContactName)),
                    Address = info.GetString(nameof(this.Supplier) + nameof(this.Supplier.Address)),
                    City = info.GetString(nameof(this.Supplier) + nameof(this.Supplier.City)),
                    Region = info.GetString(nameof(this.Supplier) + nameof(this.Supplier.Region)),
                    PostalCode = info.GetString(nameof(this.Supplier) + nameof(this.Supplier.PostalCode)),
                    Country = info.GetString(nameof(this.Supplier) + nameof(this.Supplier.Country)),
                    Phone = info.GetString(nameof(this.Supplier) + nameof(this.Supplier.Phone)),
                    Fax = info.GetString(nameof(this.Supplier) + nameof(this.Supplier.Fax)),
                    HomePage = info.GetString(nameof(this.Supplier) + nameof(this.Supplier.HomePage))
                };
            }
        }
开发者ID:VictorGavrish,项目名称:MentoringD2D3,代码行数:58,代码来源:Product.cs


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