private static void ReadListHelper(IEnumerable en, List <T> lst, FormatObjectDeserializer deserializer) { deserializer.VerifyDataNotNull(en, "enumerable"); foreach (object obj2 in en) { T local = deserializer.DeserializeObject(PSObjectHelper.AsPSObject(obj2)) as T; deserializer.VerifyDataNotNull(local, "entry"); lst.Add(local); } }
private static void ReadListHelper(IEnumerable en, List <T> lst, FormatObjectDeserializer deserializer) { deserializer.VerifyDataNotNull(en, "enumerable"); foreach (object obj in en) { FormatInfoData fid = deserializer.DeserializeObject(PSObjectHelper.AsPSObject(obj)); T entry = fid as T; deserializer.VerifyDataNotNull(entry, "entry"); lst.Add(entry); } }
internal override void Deserialize(PSObject so, FormatObjectDeserializer deserializer) { base.Deserialize(so, deserializer); deserializer.VerifyDataNotNull(base.shapeInfo, "shapeInfo"); this.pageHeaderEntry = (PageHeaderEntry) deserializer.DeserializeMemberObject(so, "pageHeaderEntry"); this.pageFooterEntry = (PageFooterEntry) deserializer.DeserializeMemberObject(so, "pageFooterEntry"); this.autosizeInfo = (AutosizeInfo) deserializer.DeserializeMemberObject(so, "autosizeInfo"); }
internal override void Deserialize(PSObject so, FormatObjectDeserializer deserializer) { base.Deserialize(so, deserializer); deserializer.VerifyDataNotNull(base.shapeInfo, "shapeInfo"); this.pageHeaderEntry = (PageHeaderEntry)deserializer.DeserializeMemberObject(so, "pageHeaderEntry"); this.pageFooterEntry = (PageFooterEntry)deserializer.DeserializeMemberObject(so, "pageFooterEntry"); this.autosizeInfo = (AutosizeInfo)deserializer.DeserializeMemberObject(so, "autosizeInfo"); }
internal override void Deserialize(PSObject so, FormatObjectDeserializer deserializer) { base.Deserialize(so, deserializer); // for the base class the shapeInfo is optional, but it's mandatory for this class deserializer.VerifyDataNotNull(this.shapeInfo, "shapeInfo"); this.pageHeaderEntry = (PageHeaderEntry)deserializer.DeserializeMemberObject(so, "pageHeaderEntry"); this.pageFooterEntry = (PageFooterEntry)deserializer.DeserializeMemberObject(so, "pageFooterEntry"); this.autosizeInfo = (AutosizeInfo)deserializer.DeserializeMemberObject(so, "autosizeInfo"); }