本文整理汇总了C#中System.Runtime.Serialization.SerializationInfo.GetInt64方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationInfo.GetInt64方法的具体用法?C# SerializationInfo.GetInt64怎么用?C# SerializationInfo.GetInt64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Runtime.Serialization.SerializationInfo
的用法示例。
在下文中一共展示了SerializationInfo.GetInt64方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VideoFile
private VideoFile(SerializationInfo info, DeserializeInfo di)
: this(di.Server, di.Info, di.Type)
{
actors = info.GetValue("a", typeof(string[])) as string[];
description = info.GetString("de");
director = info.GetString("di");
genre = info.GetString("g");
title = info.GetString("t");
try {
width = info.GetInt32("w");
height = info.GetInt32("h");
}
catch (Exception) {
}
var ts = info.GetInt64("du");
if (ts > 0) {
duration = new TimeSpan(ts);
}
try {
bookmark = info.GetInt64("b");
}
catch (Exception) {
bookmark = 0;
}
try {
subTitle = info.GetValue("st", typeof(Subtitle)) as Subtitle;
}
catch (Exception) {
subTitle = null;
}
initialized = true;
}
示例2: ParameterBindingException
protected ParameterBindingException(SerializationInfo info, StreamingContext context) : base(info, context)
{
this.parameterName = string.Empty;
this.line = -9223372036854775808L;
this.offset = -9223372036854775808L;
this.args = new object[0];
this.message = info.GetString("ParameterBindingException_Message");
this.parameterName = info.GetString("ParameterName");
this.line = info.GetInt64("Line");
this.offset = info.GetInt64("Offset");
}
示例3: TransferProgressTracker
/// <summary>
/// Initializes a new instance of the <see cref="TransferProgressTracker"/> class.
/// </summary>
/// <param name="info">Serialization information.</param>
/// <param name="context">Streaming context.</param>
protected TransferProgressTracker(SerializationInfo info, StreamingContext context)
{
if (info == null)
{
throw new System.ArgumentNullException("info");
}
this.bytesTransferred = info.GetInt64(BytesTransferredName);
this.numberOfFilesTransferred = info.GetInt64(FilesTransferredName);
this.numberOfFilesSkipped = info.GetInt64(FilesSkippedName);
this.numberOfFilesFailed = info.GetInt64(FilesFailedName);
}
示例4: StoreWorldDetail
//
protected StoreWorldDetail(SerializationInfo info, StreamingContext context)
{
_storeid = info.GetInt64("sid");
_storeworldid = info.GetInt64 ("swid");
_year = info.GetInt16("y");
_available_work_time_hours = (decimal?)info.GetValue("_1", typeof(decimal?));
_available_buffer_hours = (double?)info.GetValue("_2", typeof(double?));
_business_volume_hours = (decimal?)info.GetValue("_3", typeof(decimal?));
_targetedbusinessvolume = (decimal?)info.GetValue("_4", typeof(decimal?));
_netbusinessvolume1 = (decimal?)info.GetValue("_5", typeof(decimal?));
_netbusinessvolume2 = (decimal?)info.GetValue("_6", typeof(decimal?));
_benchmark_perfomance = (double?)info.GetValue("_7", typeof(double?));
}
示例5: WindowInfo
public WindowInfo( SerializationInfo info, StreamingContext context )
{
long pointer = info.GetInt64( "Handle" );
// The pointer is serialized as a 64 bit integer, but the system might be 32 bit.
Handle = IntPtr.Size == 8 ? new IntPtr( pointer ) : new IntPtr( (int)pointer );
}
示例6: FileWebResponse
protected FileWebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext)
{
this.m_headers = (WebHeaderCollection) serializationInfo.GetValue("headers", typeof(WebHeaderCollection));
this.m_uri = (Uri) serializationInfo.GetValue("uri", typeof(Uri));
this.m_contentLength = serializationInfo.GetInt64("contentLength");
this.m_fileAccess = (FileAccess) serializationInfo.GetInt32("fileAccess");
}
示例7: NewsManager
/// <summary>
/// Deserialization constructor.
/// </summary>
public NewsManager(SerializationInfo info, StreamingContext context)
{
_updateTimer.Interval = info.GetInt64("timerInterval");
_updateTimer.Enabled = info.GetBoolean("timerEnabled");
_updateTimer.Elapsed += new ElapsedEventHandler(_updateTimer_Elapsed);
}
示例8: DeleteStatement
private DeleteStatement(SerializationInfo info, StreamingContext context)
: base(info, context)
{
TableName = (ObjectName) info.GetValue("TableName", typeof (ObjectName));
WhereExpression = (SqlExpression) info.GetValue("Where", typeof (SqlExpression));
Limit = info.GetInt64("Limit");
}
示例9: NetworkEnvelope
protected NetworkEnvelope(SerializationInfo info, StreamingContext context)
{
DispatchId = info.GetInt32(NetworkEnvelopeMetadataKeys.DispatchId);
IssueDate = new DateTime(info.GetInt64(NetworkEnvelopeMetadataKeys.IssueDate));
Error = (ServerError) info.GetValue("Error", typeof (ServerError));
Message = (IMessage) info.GetValue("Message", typeof (IMessage));
}
示例10: EmployeeDayTimeResult
protected EmployeeDayTimeResult(SerializationInfo info, StreamingContext context)
{
_contractBegin = info.GetDateTime("cb");
_contractEnd = info.GetDateTime("ce");
_coefficient = info.GetDecimal("dt");
_employeeID = info.GetInt64("em");
}
示例11: HttpWebResponse
protected HttpWebResponse(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext)
{
_webHeaderCollection = (WebHeaderCollection)serializationInfo.GetValue("_HttpResponseHeaders", typeof(WebHeaderCollection));
_requestUri = (Uri)serializationInfo.GetValue("_Uri", typeof(Uri));
Version version = (Version)serializationInfo.GetValue("_Version", typeof(Version));
_isVersionHttp11 = version.Equals(HttpVersion.Version11);
ContentLength = serializationInfo.GetInt64("_ContentLength");
}
示例12: UnsupportedBencodeException
protected UnsupportedBencodeException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
if (info == null)
return;
StreamPosition = info.GetInt64("StreamPosition");
}
示例13: ConnectionParameters
/// <summary>
/// Creates a new <see cref="ConnectionParameters"/> 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 ConnectionParameters(SerializationInfo info, StreamingContext context)
{
// Deserialize connection parameters
m_timeOffset = info.GetInt64("timeOffset");
m_frameRate = info.GetUInt16("frameRate");
m_nominalFrequency = (LineFrequency)info.GetValue("nominalFrequency", typeof(LineFrequency));
m_stationName = info.GetString("stationName");
}
示例14: RateLimit
protected RateLimit(SerializationInfo info, StreamingContext context)
{
Ensure.ArgumentNotNull(info, "info");
Limit = info.GetInt32("Limit");
Remaining = info.GetInt32("Remaining");
ResetAsUtcEpochSeconds = info.GetInt64("ResetAsUtcEpochSeconds");
}
示例15: RateLimit
protected RateLimit(SerializationInfo info, StreamingContext context)
{
Ensure.ArgumentNotNull(info, "info");
Limit = info.GetInt32("Limit");
Remaining = info.GetInt32("Remaining");
Reset = new DateTimeOffset(info.GetInt64("Reset"), TimeSpan.Zero);
}