本文整理汇总了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");
}
示例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));
}
示例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");
}
示例4: EmployeeDayTimeResult
protected EmployeeDayTimeResult(SerializationInfo info, StreamingContext context)
{
_contractBegin = info.GetDateTime("cb");
_contractEnd = info.GetDateTime("ce");
_coefficient = info.GetDecimal("dt");
_employeeID = info.GetInt64("em");
}
示例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");
}
示例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));
}
示例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");
}
示例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);
}
示例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;
}
示例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");
}
示例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;
}
示例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;
}
}
示例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");
}
示例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");
}
示例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))
};
}
}