當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。