protected RolePrincipal(SerializationInfo info, StreamingContext context) { this._Version = info.GetInt32("_Version"); this._ExpireDate = info.GetDateTime("_ExpireDate"); this._IssueDate = info.GetDateTime("_IssueDate"); try { this._Identity = info.GetValue("_Identity", typeof(IIdentity)) as IIdentity; } catch { } this._ProviderName = info.GetString("_ProviderName"); this._Username = info.GetString("_Username"); this._IsRoleListCached = info.GetBoolean("_IsRoleListCached"); this._Roles = new HybridDictionary(true); string str = info.GetString("_AllRoles"); if (str != null) { foreach (string str2 in str.Split(new char[] { ',' })) { if (this._Roles[str2] == null) { this._Roles.Add(str2, string.Empty); } } } }
protected EmployeeDayTimeResult(SerializationInfo info, StreamingContext context) { _contractBegin = info.GetDateTime("cb"); _contractEnd = info.GetDateTime("ce"); _coefficient = info.GetDecimal("dt"); _employeeID = info.GetInt64("em"); }
/// <summary> /// Initializes a new instance of the <see cref="Plate"/> 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 Plate(SerializationInfo info, StreamingContext context) { Content = (Well[])info.GetValue("Content", typeof(Well[])); Type = (IPlateType) info.GetValue("Type", typeof (IPlateType)); Created = info.GetDateTime("Created"); LastChanged = info.GetDateTime("LastChanged"); }
protected RecurringSchedule(SerializationInfo info, StreamingContext context) { type = (RecurringScheduleUnit)info.GetValue("Type", typeof(RecurringScheduleUnit)); frequency = (int)info.GetValue("Frequency", typeof(int)); executionTime = (DateTime)info.GetValue("ExecutionTime", typeof(DateTime)); weeklySchedule = (DaysOfWeek)info.GetValue("WeeklySchedule", typeof(DaysOfWeek)); monthlySchedule = (int)info.GetValue("MonthlySchedule", typeof(int)); LastRun = (DateTime)info.GetDateTime("LastRun"); NextRunCache = (DateTime)info.GetDateTime("NextRun"); }
/// <summary> /// Deserializes an exception. /// </summary> private ReplayAttackException(SerializationInfo info, StreamingContext context) : base(info, context) { #region Sanity checks if (info == null) throw new ArgumentNullException("info"); #endregion FeedUrl = new Uri(info.GetString("FeedUrl")); OldTime = info.GetDateTime("OldTime"); NewTime = info.GetDateTime("NewTime"); }
/// <summary> /// Overloaded constructor for deserialization of object /// </summary> /// <param name="info"></param> /// <param name="ctxt"></param> public UserQuerySettings(SerializationInfo info, StreamingContext ctxt) { this.DatabasePath = info.GetString(DB_PATH); this.SourceTable = info.GetString(SOURCE_TABLE); this.FromDate = info.GetDateTime(FROM_DATE); this.ToDate = info.GetDateTime(TO_DATE); this.DateFieldName = info.GetString(DATE_FIELDNAME); this.fields = new List<string>(); this.recentFiles = (List<string>)info.GetValue(RECENT_FILES, typeof(List<string>)); //not storing fields and localities a the moment. }
/// <summary> /// /// </summary> /// <param name="info"></param> /// <param name="ctxt"></param> public Person(SerializationInfo info, StreamingContext ctxt) { _full_name = info.GetString("full_name"); _sex = (Sex)info.GetValue("sex", typeof(Sex)); _birth_date = info.GetDateTime("birth_date"); _photo_path = info.GetString("photo_path"); }
protected WfTransition(SerializationInfo info, StreamingContext context) { this._ID = info.GetString("ID"); this._FromActivity = (WfActivityBase)info.GetValue("FromActivity", typeof(WfActivityBase)); this._ToActivity = (WfActivityBase)info.GetValue("ToActivity", typeof(WfActivityBase)); this._IsAborted = info.GetBoolean("IsAborted"); this._StartTime = info.GetDateTime("StartTime"); }
public PoeAccHandler(SerializationInfo info, StreamingContext ctxt) { cookies = (CookieContainer)info.GetValue("cookies", typeof(CookieContainer)); UserDisplayName = info.GetString("UserDisplayName"); _UserLogin = info.GetString("userLogin"); _UserPassword = info.GetString("userPassword"); LastStashRefresh = info.GetDateTime("LastStashRefresh"); }
public GridTransform(SerializationInfo info, StreamingContext context) { _mapPoints = info.GetValue("_mapPoints", typeof(MappingGridVector2[])) as MappingGridVector2[]; _TriangleIndiciesCache = info.GetValue("_TriangleIndiciesCache", typeof(int[])) as int[]; _CachedMappedBounds = (GridRectangle)info.GetValue("_CachedMappedBounds", typeof(GridRectangle)); _CachedControlBounds = (GridRectangle)info.GetValue("_CachedControlBounds", typeof(GridRectangle)); LastModified = info.GetDateTime("LastModified"); }
public Signature(SerializationInfo info, StreamingContext context) { Text = info.GetString("Text"); DateTime = info.GetDateTime("DateTime"); SecurityHash = (byte[]) info.GetValue("SecurityHash", typeof(byte[])); SecurityToken = (byte[])info.GetValue("SecurityToken", typeof(byte[])); UserName = info.GetString("UserName"); }
/// <summary> /// Deserializable constructor /// </summary> /// <param name="info"></param> /// <param name="ctxt"></param> public Song(SerializationInfo info, StreamingContext context) { this.ID = info.GetInt32("ID"); this.Title = info.GetString("Title"); this.TrackNumber = info.GetInt16("TrackNumber"); this.Duration = (TimeSpan)info.GetValue("Duration", typeof(TimeSpan)); this.SongLocation = (SongLocations)info.GetValue("SongLocation", typeof(SongLocations)); this.UploadDate = info.GetDateTime("UploadDate"); }
/// <summary> /// Constructor used for deserialization of the exception class. /// </summary> /// <param name="info">Represents the SerializationInfo of the exception.</param> /// <param name="context">Represents the context information of the exception.</param> protected BaseApplicationException(SerializationInfo info, StreamingContext context) : base(info, context) { machineName = info.GetString("machineName"); createdDateTime = info.GetDateTime("createdDateTime"); appDomainName = info.GetString("appDomainName"); threadIdentity = info.GetString("threadIdentity"); windowsIdentity = info.GetString("windowsIdentity"); additionalInformation = (NameValueCollection)info.GetValue("additionalInformation",typeof(NameValueCollection)); }
/// <summary> /// Deserialization constructor /// </summary> /// <param name="info">The info.</param> /// <param name="context">The context.</param> protected DocumentInformation(SerializationInfo info, StreamingContext context) { if(Tracing.BinaryDeserializationSwitch.Enabled) Trace.WriteLine("Deserializing the fields of 'DocumentInformation'."); mAuthor = info.GetString("Author"); mCreationDate = info.GetDateTime("CreationDate").ToString(); mDescription = info.GetString("Description"); mTitle = info.GetString("Title"); }
/// <summary> /// /// </summary> /// <param name="info"></param> /// <param name="context"></param> protected WfProcess(SerializationInfo info, StreamingContext context) { this._ID = info.GetString("ID"); this._ResourceID = info.GetString("ResourceID"); this._Activities = (WfActivityCollection)info.GetValue("Activities", typeof(WfActivityCollection)); this._Context = (WfProcessContext)info.GetValue("Context", typeof(WfProcessContext)); this._Status = (WfProcessStatus)info.GetValue("Status", typeof(WfProcessStatus)); this._StartTime = info.GetDateTime("StartTime"); this._EndTime = info.GetDateTime("EndTime"); this._Creator = (IUser)info.GetValue("Creator", typeof(IUser)); this._OwnerDepartment = (IOrganization)info.GetValue("OwnerDepartment", typeof(IOrganization)); this._EntryInfo = (WfBranchProcessInfo)info.GetValue("EntryInfo", typeof(WfBranchProcessInfo)); this._LoadingType = (DataLoadingType)info.GetValue("LoadingType", typeof(DataLoadingType)); WfProcessContextCache.Instance[this._ID] = this; }
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"); }
protected Message(SerializationInfo info, StreamingContext context) { this.Text = info.GetString("subj"); this.SubItems.Add(info.GetString("msgtxt")); this.SubItems.Add(info.GetString("recur")); this.SubItems.Add(info.GetString("senddate")); m_enRecurFrequency = (Recurs)info.GetInt32("ri"); m_nLeadTime = info.GetInt32("lti"); m_Date = info.GetDateTime("msgdate"); }
protected AccessToken(SerializationInfo info, StreamingContext context) { if (null == info) throw new ArgumentNullException("info"); this.Expiration = info.GetDateTime("Expiration"); this.Scope = (List<string>)info.GetValue("Scope", typeof(List<string>)); this.RefreshToken = info.GetString("RefreshToken"); this.Token = info.GetString("Token"); this.TokenType = (TokenType)info.GetValue("TokenType", typeof(TokenType)); }
public Album(SerializationInfo info, StreamingContext context) { this.ID = info.GetInt32("ID"); this.Name = info.GetString("Name"); this.ReleaseDate = info.GetDateTime("ReleaseDate"); this.Songs = (Dictionary<int, Song>)info.GetValue("Songs", typeof(Dictionary<int, Song>)); foreach (int k in this.Songs.Keys) { this.Songs[k].ParentAlbum = this; } }
public BaseApplicationException(SerializationInfo info, StreamingContext context) : base(info, context) { this._machineName = info.GetString("machineName"); this._createdDateTime = info.GetDateTime("createdDateTime"); this._appDomainName = info.GetString("appDomainName"); this._threadIdentity = info.GetString("threadIdentity"); this._windowsIdentity = info.GetString("windowsIdentity"); //Set the HResult this.HResult = (HResultBase << 16) + this.ExceptionNumber; }
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"); }
/// <summary> /// ISerializable private constructor. /// </summary> /// <param name="s"> SerializationInfo. </param> /// <param name="context"> The StreamingContext.</param> private Session(SerializationInfo s, StreamingContext context) { this.SessionDate = s.GetDateTime("SessionDate"); this.SessionRequests = (SessionRequestList)s.GetValue("SessionRequests", typeof(SessionRequestList)); try { this.IsCookieUpdatable = s.GetBoolean("IsCookieUpdatable"); this.AllowSafeRequestBacktracking = s.GetBoolean("AllowSafeRequestBacktracking"); } catch { // ignore } }
protected JournalEntry(SerializationInfo info, StreamingContext context) { Created = info.GetDateTime("Created"); if (!_unsignedIdsInJournal.HasValue) { try { Id = info.GetUInt64("Id"); _unsignedIdsInJournal = true; } catch (Exception) { Id = (ulong) info.GetInt64("Id"); _unsignedIdsInJournal = false; } } else if (_unsignedIdsInJournal.Value) Id = info.GetUInt64("Id"); else Id = (ulong) info.GetInt64("Id"); }
private RequestCacheFileEntry(SerializationInfo info, StreamingContext context) { fObjType = info.GetString("fObjType"); fMessageId = info.GetString("fMessageId"); fRequestTime = info.GetDateTime("fRequestTime"); // fState is set by second desserialize call, //which sets State Property //try //{ // fState = info.GetValue("fState", typeof(Object)); //} //catch (Exception ex) //{ // Agent.Log.Error // ("Error retrieving custom UserData from RequestCache: " + ex.Message, ex); //} }
public BinarySerializableClassNotRestoringAllProperties(SerializationInfo info, StreamingContext context) { BirthDay = info.GetDateTime("BirthDay"); }
/// <summary> /// Initializes a new instance of the ArchiveFileInfo class with /// serialized data. /// </summary> /// <param name="info">The SerializationInfo that holds the serialized /// object data about the exception being thrown.</param> /// <param name="context">The StreamingContext that contains contextual /// information about the source or destination.</param> protected ArchiveFileInfo(SerializationInfo info, StreamingContext context) : base(info, context) { this.archiveInfo = (ArchiveInfo) info.GetValue( "archiveInfo", typeof(ArchiveInfo)); this.name = info.GetString("name"); this.path = info.GetString("path"); this.initialized = info.GetBoolean("initialized"); this.exists = info.GetBoolean("exists"); this.archiveNumber = info.GetInt32("archiveNumber"); this.attributes = (FileAttributes) info.GetValue( "attributes", typeof(FileAttributes)); this.lastWriteTime = info.GetDateTime("lastWriteTime"); this.length = info.GetInt64("length"); }
protected ContentManager(SerializationInfo info, StreamingContext ctxt) { SerializationInfoEnumerator infoEnum = info.GetEnumerator(); while (infoEnum.MoveNext()) { switch (infoEnum.Name) { case "settingsList": _settingsList = (List<BaseSettings>)info.GetValue("settingsList", typeof(List<BaseSettings>)); break; case "tableContent": _tableContent = (DataTable)info.GetValue("tableContent", typeof(DataTable)); _viewContent = new DataView(_tableContent); _viewContent.Sort = info.GetString("sort"); break; case "playlists": _playlists = (Dictionary<string, List<int>>)info.GetValue("playlists", typeof(Dictionary<string, List<int>>)); break; case "fileId": _fileId = (Guid)info.GetValue("fileId", typeof(Guid)); break; case "author": _author = info.GetString("author"); break; case "creationDate": _creationDate = info.GetDateTime("creationDate"); break; case "modificationDate": _modificationDate = info.GetDateTime("creationDate"); break; } } if (_playlists == null) _playlists = new Dictionary<string, List<int>>(); InitContentManager(); }
public void GetObjectData_SerializationInfo_AreEqual() { ISerializable obj = TestStruct; var info = new SerializationInfo(typeof(WeekDate), new System.Runtime.Serialization.FormatterConverter()); obj.GetObjectData(info, default(StreamingContext)); Assert.AreEqual((DateTime)TestStruct, info.GetDateTime("Value")); }
public RedisSerializableTest(SerializationInfo info, StreamingContext context) { ObjectField = new RedisSerializableTest(); foreach (var item in info) { switch (item.Name) { case "str": StringField = info.GetString(item.Name); break; case "int": IntField = info.GetInt32(item.Name); break; case "null": NullField = info.GetString(item.Name); break; case "date": DateTimeField = info.GetDateTime(item.Name); break; case "obj.str": ObjectField.StringField = info.GetString(item.Name); break; case "obj.int": ObjectField.IntField = info.GetInt32(item.Name); break; case "obj.date": ObjectField.DateTimeField = info.GetDateTime(item.Name); break; } } }
/// <summary> /// Serialization constructor /// </summary> /// <param name="info">The <see cref="SerializationInfo" /> that holds the serialized object data.</param> /// <param name="context">The <see cref="StreamingContext" /> that contains contextual information about the source or destination.</param> /// <remarks> /// <para> /// Initializes a new instance of the <see cref="LoggingEvent" /> class /// with serialized data. /// </para> /// </remarks> protected LoggingEvent(SerializationInfo info, StreamingContext context) { m_data.LoggerName = info.GetString("LoggerName"); // Note we are deserializing the whole level object. That is the // name and the value. This value is correct for the source // hierarchy but may not be for the target hierarchy that this // event may be re-logged into. If it is to be re-logged it may // be necessary to re-lookup the level based only on the name. m_data.Level = (Level)info.GetValue("Level", typeof(Level)); m_data.Message = info.GetString("Message"); m_data.ThreadName = info.GetString("ThreadName"); m_data.TimeStamp = info.GetDateTime("TimeStamp"); m_data.LocationInfo = (LocationInfo) info.GetValue("LocationInfo", typeof(LocationInfo)); m_data.UserName = info.GetString("UserName"); m_data.ExceptionString = info.GetString("ExceptionString"); m_data.Properties = (PropertiesDictionary) info.GetValue("Properties", typeof(PropertiesDictionary)); m_data.Domain = info.GetString("Domain"); m_data.Identity = info.GetString("Identity"); // We have restored all the values of this instance, i.e. all the values are fixed // Set the fix flags otherwise the data values may be overwritten from the current environment. m_fixFlags = FixFlags.All; }