protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty); result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Collections.Generic.IList <string> nullable = default(System.Collections.Generic.IList <string>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(0); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable = this._serializer0.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable == null) == false)) { if ((result.ListPolymorphicItself == null)) { this._methodBasePolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_set_ListPolymorphicItself0.Invoke(result, new object[] { nullable }); } else { System.Collections.Generic.IEnumerator <string> enumerator = nullable.GetEnumerator(); string current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; result.ListPolymorphicItself.Add(current); } } finally { enumerator.Dispose(); } } } unpacked = (unpacked + 1); } else { int itemsCount0 = default(int); itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); for (int i = 0; (i < itemsCount0); i = (i + 1)) { string key = default(string); string nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "ListPolymorphicItself")) { System.Collections.Generic.IList <string> nullable1 = default(System.Collections.Generic.IList <string>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer0.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { if ((result.ListPolymorphicItself == null)) { this._methodBasePolymorphicMemberTypeKnownType_List_ListPolymorphicItselfPrivateSetterCollectionProperty_set_ListPolymorphicItself0.Invoke(result, new object[] { nullable1 }); } else { System.Collections.Generic.IEnumerator <string> enumerator0 = nullable1.GetEnumerator(); string current0; try { for ( ; enumerator0.MoveNext(); ) { current0 = enumerator0.Current; result.ListPolymorphicItself.Add(current0); } } finally { enumerator0.Dispose(); } } } } else { unpacker.Skip(); } } } return(result); }
public void Dispose() { _inner.Dispose(); }
protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty); result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Collections.Generic.IDictionary <object, string> nullable = default(System.Collections.Generic.IDictionary <object, string>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(0); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable = this._serializer1.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable == null) == false)) { System.Collections.Generic.IEnumerator <System.Collections.Generic.KeyValuePair <object, string> > enumerator = nullable.GetEnumerator(); System.Collections.Generic.KeyValuePair <object, string> current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; result.DictObjectKeyAndStaticItem.Add(current.Key, current.Value); } } finally { enumerator.Dispose(); } } unpacked = (unpacked + 1); } else { int itemsCount0 = default(int); itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); for (int i = 0; (i < itemsCount0); i = (i + 1)) { string key = default(string); string nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Dict_DictObjectKeyAndStaticItemGetOnlyCollectionProperty), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "DictObjectKeyAndStaticItem")) { System.Collections.Generic.IDictionary <object, string> nullable1 = default(System.Collections.Generic.IDictionary <object, string>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer1.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { System.Collections.Generic.IEnumerator <System.Collections.Generic.KeyValuePair <object, string> > enumerator0 = nullable1.GetEnumerator(); System.Collections.Generic.KeyValuePair <object, string> current0; try { for ( ; enumerator0.MoveNext(); ) { current0 = enumerator0.Current; result.DictObjectKeyAndStaticItem.Add(current0.Key, current0.Value); } } finally { enumerator0.Dispose(); } } } else { unpacker.Skip(); } } } return(result); }
protected internal override MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField result = default(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField); result = new MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Collections.Generic.IList <MsgPack.Serialization.FileSystemEntry> nullable = default(System.Collections.Generic.IList <MsgPack.Serialization.FileSystemEntry>); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(0); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable = this._serializer0.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable == null) == false)) { System.Collections.Generic.IEnumerator <MsgPack.Serialization.FileSystemEntry> enumerator = nullable.GetEnumerator(); MsgPack.Serialization.FileSystemEntry current; try { for ( ; enumerator.MoveNext(); ) { current = enumerator.Current; result.ListPolymorphicItem.Add(current); } } finally { enumerator.Dispose(); } } unpacked = (unpacked + 1); } else { int itemsCount0 = default(int); itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); for (int i = 0; (i < itemsCount0); i = (i + 1)) { string key = default(string); string nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeRuntimeType_List_ListPolymorphicItemReadOnlyCollectionField), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "ListPolymorphicItem")) { System.Collections.Generic.IList <MsgPack.Serialization.FileSystemEntry> nullable1 = default(System.Collections.Generic.IList <MsgPack.Serialization.FileSystemEntry>); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer0.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer0.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { System.Collections.Generic.IEnumerator <MsgPack.Serialization.FileSystemEntry> enumerator0 = nullable1.GetEnumerator(); MsgPack.Serialization.FileSystemEntry current0; try { for ( ; enumerator0.MoveNext(); ) { current0 = enumerator0.Current; result.ListPolymorphicItem.Add(current0); } } finally { enumerator0.Dispose(); } } } else { unpacker.Skip(); } } } return(result); }
public void Dispose() { enumerator.Dispose(); }
/// <inheritdoc /> public void Dispose() { _source.Dispose(); }
private static System.Collections.Generic.List<System.Collections.Generic.Dictionary<string, string>> GetUserLatestPostsFromResult(System.Collections.ArrayList result) { System.Collections.Generic.List<System.Collections.Generic.Dictionary<string, string>> list = new System.Collections.Generic.List<System.Collections.Generic.Dictionary<string, string>>(); try { try { System.Collections.IEnumerator enumerator = result.GetEnumerator(); while (enumerator.MoveNext()) { object objectValue = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(enumerator.Current); System.Collections.Generic.Dictionary<string, string> dictionary = new System.Collections.Generic.Dictionary<string, string>(); dictionary.Add("id", ""); dictionary.Add("link", ""); dictionary.Add("thumbnail-image", ""); dictionary.Add("lowres-image", ""); dictionary.Add("highres-image", ""); dictionary.Add("lowres-video", ""); dictionary.Add("highres-video", ""); dictionary.Add("description", ""); dictionary.Add("description-notags", ""); dictionary.Add("tags", ""); dictionary.Add("latitude", ""); dictionary.Add("longitude", ""); dictionary.Add("location", ""); if (Conversions.ToBoolean(NewLateBinding.LateGet(objectValue, null, "containskey", new object[] { "id" }, null, null, null))) { dictionary["id"] = Conversions.ToString(NewLateBinding.LateIndexGet(objectValue, new object[] { "id" }, null)); } if (Conversions.ToBoolean(NewLateBinding.LateGet(objectValue, null, "containskey", new object[] { "link" }, null, null, null))) { dictionary["link"] = Conversions.ToString(NewLateBinding.LateIndexGet(objectValue, new object[] { "link" }, null)); } if (Conversions.ToBoolean(NewLateBinding.LateGet(objectValue, null, "containskey", new object[] { "videos" }, null, null, null))) { dictionary.Add("video", ""); System.Collections.Generic.Dictionary<string, object> dictionary2 = (System.Collections.Generic.Dictionary<string, object>)NewLateBinding.LateIndexGet(objectValue, new object[] { "videos" }, null); try { System.Collections.Generic.Dictionary<string, object>.Enumerator enumerator2 = dictionary2.GetEnumerator(); while (enumerator2.MoveNext()) { System.Collections.Generic.KeyValuePair<string, object> current = enumerator2.Current; string key = current.Key; if (Operators.CompareString(key, "low_bandwidth", false) == 0) { System.Collections.Generic.Dictionary<string, object> dictionary3 = (System.Collections.Generic.Dictionary<string, object>)current.Value; dictionary["lowres-video"] = Conversions.ToString(dictionary3["url"]); } else if (Operators.CompareString(key, "standard_resolution", false) == 0) { System.Collections.Generic.Dictionary<string, object> dictionary4 = (System.Collections.Generic.Dictionary<string, object>)current.Value; dictionary["highres-video"] = Conversions.ToString(dictionary4["url"]); } } } finally { System.Collections.Generic.Dictionary<string, object>.Enumerator enumerator2; ((System.IDisposable)enumerator2).Dispose(); } } if (Conversions.ToBoolean((!Conversions.ToBoolean(NewLateBinding.LateGet(objectValue, null, "containskey", new object[] { "location" }, null, null, null)) || !Conversions.ToBoolean(NewLateBinding.LateIndexGet(objectValue, new object[] { "location" }, null) != null)) ? false : true)) { System.Collections.Generic.Dictionary<string, object> dictionary5 = (System.Collections.Generic.Dictionary<string, object>)NewLateBinding.LateIndexGet(objectValue, new object[] { "location" }, null); try { System.Collections.Generic.Dictionary<string, object>.Enumerator enumerator3 = dictionary5.GetEnumerator(); while (enumerator3.MoveNext()) { System.Collections.Generic.KeyValuePair<string, object> current2 = enumerator3.Current; string key2 = current2.Key; if (Operators.CompareString(key2, "latitude", false) == 0) { dictionary["latitude"] = Conversions.ToString(current2.Value); } else if (Operators.CompareString(key2, "longitude", false) == 0) { dictionary["longitude"] = Conversions.ToString(current2.Value); } else if (Operators.CompareString(key2, "name", false) == 0) { dictionary["location"] = Conversions.ToString(current2.Value); } } } finally { System.Collections.Generic.Dictionary<string, object>.Enumerator enumerator3; ((System.IDisposable)enumerator3).Dispose(); } } if (NewLateBinding.LateGet(objectValue, null, "containskey", new object[] { "images" }, null, null, null) != null) { System.Collections.Generic.Dictionary<string, object> dictionary6 = (System.Collections.Generic.Dictionary<string, object>)NewLateBinding.LateIndexGet(objectValue, new object[] { "images" }, null); try { System.Collections.Generic.Dictionary<string, object>.Enumerator enumerator4 = dictionary6.GetEnumerator(); while (enumerator4.MoveNext()) { System.Collections.Generic.KeyValuePair<string, object> current3 = enumerator4.Current; string key3 = current3.Key; if (Operators.CompareString(key3, "thumbnail", false) == 0) { System.Collections.Generic.Dictionary<string, object> dictionary7 = (System.Collections.Generic.Dictionary<string, object>)current3.Value; dictionary["thumbnail-image"] = Conversions.ToString(dictionary7["url"]); } else if (Operators.CompareString(key3, "low_resolution", false) == 0) { System.Collections.Generic.Dictionary<string, object> dictionary8 = (System.Collections.Generic.Dictionary<string, object>)current3.Value; dictionary["lowres-image"] = Conversions.ToString(dictionary8["url"]); } else if (Operators.CompareString(key3, "standard_resolution", false) == 0) { System.Collections.Generic.Dictionary<string, object> dictionary9 = (System.Collections.Generic.Dictionary<string, object>)current3.Value; dictionary["highres-image"] = Conversions.ToString(dictionary9["url"]); } } } finally { System.Collections.Generic.Dictionary<string, object>.Enumerator enumerator4; ((System.IDisposable)enumerator4).Dispose(); } } if (NewLateBinding.LateGet(objectValue, null, "containskey", new object[] { "caption" }, null, null, null) != null) { System.Collections.Generic.Dictionary<string, object> dictionary10 = (System.Collections.Generic.Dictionary<string, object>)NewLateBinding.LateIndexGet(objectValue, new object[] { "caption" }, null); try { System.Collections.Generic.Dictionary<string, object>.Enumerator enumerator5 = dictionary10.GetEnumerator(); while (enumerator5.MoveNext()) { System.Collections.Generic.KeyValuePair<string, object> current4 = enumerator5.Current; string key4 = current4.Key; if (Operators.CompareString(key4, "text", false) == 0) { dictionary["description"] = Conversions.ToString(current4.Value); dictionary["description-notags"] = Conversions.ToString(current4.Value); } } } finally { System.Collections.Generic.Dictionary<string, object>.Enumerator enumerator5; ((System.IDisposable)enumerator5).Dispose(); } } if (NewLateBinding.LateGet(objectValue, null, "containskey", new object[] { "tags" }, null, null, null) != null) { System.Collections.ArrayList arrayList = (System.Collections.ArrayList)NewLateBinding.LateIndexGet(objectValue, new object[] { "tags" }, null); bool flag = false; try { System.Collections.Generic.IEnumerator<object> enumerator6 = (from f in arrayList.ToArray().ToList<object>() orderby f.ToString().Length descending select f).GetEnumerator(); while (enumerator6.MoveNext()) { object objectValue2 = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(enumerator6.Current); dictionary["tags"] = Conversions.ToString(Operators.AddObject(Operators.AddObject(dictionary["tags"] + "#", objectValue2), ",")); dictionary["description-notags"] = dictionary["description-notags"].Replace(Conversions.ToString(Operators.AddObject(" #", objectValue2)), "", System.StringComparison.OrdinalIgnoreCase); flag = true; } } finally { System.Collections.Generic.IEnumerator<object> enumerator6; if (enumerator6 != null) { enumerator6.Dispose(); } } if (flag) { dictionary["tags"] = dictionary["tags"].Substring(0, checked(dictionary["tags"].Length - 1)); } } list.Add(dictionary); } } finally { System.Collections.IEnumerator enumerator; if (enumerator is System.IDisposable) { (enumerator as System.IDisposable).Dispose(); } } } catch (System.Exception expr_743) { ProjectData.SetProjectError(expr_743); ProjectData.ClearProjectError(); } return list; }