Skip to content

Instantly share code, notes, and snippets.

/Reference.cs Secret

Created September 22, 2016 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/55be94e18fd8200e116dbcef6d6184ff to your computer and use it in GitHub Desktop.
Save anonymous/55be94e18fd8200e116dbcef6d6184ff to your computer and use it in GitHub Desktop.
mind blown error
Binary serialization of a List<SearchItem> blows up with (I can prove this worked as is for 5 years, not sure what is up now)
An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll
Additional information: Type 'System.Xml.XmlElement' in Assembly 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18034")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.ebay.com/marketplace/search/v1/services")]
public partial class SearchItem : object, System.ComponentModel.INotifyPropertyChanged {
private string itemIdField;
private string titleField;
private string globalIdField;
private string subtitleField;
private Category primaryCategoryField;
private Category secondaryCategoryField;
private string galleryURLField;
private GalleryURL[] galleryInfoContainerField;
private string viewItemURLField;
private string charityIdField;
private ProductId productIdField;
private string[] paymentMethodField;
private bool autoPayField;
private bool autoPayFieldSpecified;
private string postalCodeField;
private string locationField;
private string countryField;
private Storefront storeInfoField;
private SellerInfo sellerInfoField;
private ShippingInfo shippingInfoField;
private SellingStatus sellingStatusField;
private ListingInfo listingInfoField;
private bool returnsAcceptedField;
private bool returnsAcceptedFieldSpecified;
private string[] galleryPlusPictureURLField;
private string compatibilityField;
private Distance distanceField;
private Condition conditionField;
private bool isMultiVariationListingField;
private bool isMultiVariationListingFieldSpecified;
private DiscountPriceInfo discountPriceInfoField;
private string pictureURLSuperSizeField;
private string pictureURLLargeField;
private UnitPriceInfo unitPriceField;
private ItemAttribute[] attributeField;
private bool topRatedListingField;
private bool topRatedListingFieldSpecified;
private string delimiterField;
private System.Xml.XmlElement[] anyField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public string itemId {
get {
return this.itemIdField;
}
set {
this.itemIdField = value;
this.RaisePropertyChanged("itemId");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=1)]
public string title {
get {
return this.titleField;
}
set {
this.titleField = value;
this.RaisePropertyChanged("title");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="token", Order=2)]
public string globalId {
get {
return this.globalIdField;
}
set {
this.globalIdField = value;
this.RaisePropertyChanged("globalId");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=3)]
public string subtitle {
get {
return this.subtitleField;
}
set {
this.subtitleField = value;
this.RaisePropertyChanged("subtitle");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=4)]
public Category primaryCategory {
get {
return this.primaryCategoryField;
}
set {
this.primaryCategoryField = value;
this.RaisePropertyChanged("primaryCategory");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=5)]
public Category secondaryCategory {
get {
return this.secondaryCategoryField;
}
set {
this.secondaryCategoryField = value;
this.RaisePropertyChanged("secondaryCategory");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="anyURI", Order=6)]
public string galleryURL {
get {
return this.galleryURLField;
}
set {
this.galleryURLField = value;
this.RaisePropertyChanged("galleryURL");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlArrayAttribute(Order=7)]
[System.Xml.Serialization.XmlArrayItemAttribute("galleryURL", IsNullable=false)]
public GalleryURL[] galleryInfoContainer {
get {
return this.galleryInfoContainerField;
}
set {
this.galleryInfoContainerField = value;
this.RaisePropertyChanged("galleryInfoContainer");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="anyURI", Order=8)]
public string viewItemURL {
get {
return this.viewItemURLField;
}
set {
this.viewItemURLField = value;
this.RaisePropertyChanged("viewItemURL");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=9)]
public string charityId {
get {
return this.charityIdField;
}
set {
this.charityIdField = value;
this.RaisePropertyChanged("charityId");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=10)]
public ProductId productId {
get {
return this.productIdField;
}
set {
this.productIdField = value;
this.RaisePropertyChanged("productId");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("paymentMethod", DataType="token", Order=11)]
public string[] paymentMethod {
get {
return this.paymentMethodField;
}
set {
this.paymentMethodField = value;
this.RaisePropertyChanged("paymentMethod");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=12)]
public bool autoPay {
get {
return this.autoPayField;
}
set {
this.autoPayField = value;
this.RaisePropertyChanged("autoPay");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool autoPaySpecified {
get {
return this.autoPayFieldSpecified;
}
set {
this.autoPayFieldSpecified = value;
this.RaisePropertyChanged("autoPaySpecified");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=13)]
public string postalCode {
get {
return this.postalCodeField;
}
set {
this.postalCodeField = value;
this.RaisePropertyChanged("postalCode");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=14)]
public string location {
get {
return this.locationField;
}
set {
this.locationField = value;
this.RaisePropertyChanged("location");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="token", Order=15)]
public string country {
get {
return this.countryField;
}
set {
this.countryField = value;
this.RaisePropertyChanged("country");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=16)]
public Storefront storeInfo {
get {
return this.storeInfoField;
}
set {
this.storeInfoField = value;
this.RaisePropertyChanged("storeInfo");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=17)]
public SellerInfo sellerInfo {
get {
return this.sellerInfoField;
}
set {
this.sellerInfoField = value;
this.RaisePropertyChanged("sellerInfo");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=18)]
public ShippingInfo shippingInfo {
get {
return this.shippingInfoField;
}
set {
this.shippingInfoField = value;
this.RaisePropertyChanged("shippingInfo");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=19)]
public SellingStatus sellingStatus {
get {
return this.sellingStatusField;
}
set {
this.sellingStatusField = value;
this.RaisePropertyChanged("sellingStatus");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=20)]
public ListingInfo listingInfo {
get {
return this.listingInfoField;
}
set {
this.listingInfoField = value;
this.RaisePropertyChanged("listingInfo");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=21)]
public bool returnsAccepted {
get {
return this.returnsAcceptedField;
}
set {
this.returnsAcceptedField = value;
this.RaisePropertyChanged("returnsAccepted");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool returnsAcceptedSpecified {
get {
return this.returnsAcceptedFieldSpecified;
}
set {
this.returnsAcceptedFieldSpecified = value;
this.RaisePropertyChanged("returnsAcceptedSpecified");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("galleryPlusPictureURL", DataType="anyURI", Order=22)]
public string[] galleryPlusPictureURL {
get {
return this.galleryPlusPictureURLField;
}
set {
this.galleryPlusPictureURLField = value;
this.RaisePropertyChanged("galleryPlusPictureURL");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=23)]
public string compatibility {
get {
return this.compatibilityField;
}
set {
this.compatibilityField = value;
this.RaisePropertyChanged("compatibility");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=24)]
public Distance distance {
get {
return this.distanceField;
}
set {
this.distanceField = value;
this.RaisePropertyChanged("distance");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=25)]
public Condition condition {
get {
return this.conditionField;
}
set {
this.conditionField = value;
this.RaisePropertyChanged("condition");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=26)]
public bool isMultiVariationListing {
get {
return this.isMultiVariationListingField;
}
set {
this.isMultiVariationListingField = value;
this.RaisePropertyChanged("isMultiVariationListing");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool isMultiVariationListingSpecified {
get {
return this.isMultiVariationListingFieldSpecified;
}
set {
this.isMultiVariationListingFieldSpecified = value;
this.RaisePropertyChanged("isMultiVariationListingSpecified");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=27)]
public DiscountPriceInfo discountPriceInfo {
get {
return this.discountPriceInfoField;
}
set {
this.discountPriceInfoField = value;
this.RaisePropertyChanged("discountPriceInfo");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="anyURI", Order=28)]
public string pictureURLSuperSize {
get {
return this.pictureURLSuperSizeField;
}
set {
this.pictureURLSuperSizeField = value;
this.RaisePropertyChanged("pictureURLSuperSize");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="anyURI", Order=29)]
public string pictureURLLarge {
get {
return this.pictureURLLargeField;
}
set {
this.pictureURLLargeField = value;
this.RaisePropertyChanged("pictureURLLarge");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=30)]
public UnitPriceInfo unitPrice {
get {
return this.unitPriceField;
}
set {
this.unitPriceField = value;
this.RaisePropertyChanged("unitPrice");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute("attribute", Order=31)]
public ItemAttribute[] attribute {
get {
return this.attributeField;
}
set {
this.attributeField = value;
this.RaisePropertyChanged("attribute");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=32)]
public bool topRatedListing {
get {
return this.topRatedListingField;
}
set {
this.topRatedListingField = value;
this.RaisePropertyChanged("topRatedListing");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool topRatedListingSpecified {
get {
return this.topRatedListingFieldSpecified;
}
set {
this.topRatedListingFieldSpecified = value;
this.RaisePropertyChanged("topRatedListingSpecified");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=33)]
public string delimiter {
get {
return this.delimiterField;
}
set {
this.delimiterField = value;
this.RaisePropertyChanged("delimiter");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlAnyElementAttribute(Order=34)]
public System.Xml.XmlElement[] Any {
get {
return this.anyField;
}
set {
this.anyField = value;
this.RaisePropertyChanged("Any");
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}
/// <remarks/>
[System.Xml.Serialization.XmlIncludeAttribute(typeof(CategoryHistogram))]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18034")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.ebay.com/marketplace/search/v1/services")]
public partial class Category : object, System.ComponentModel.INotifyPropertyChanged {
private string categoryIdField;
private string categoryNameField;
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=0)]
public string categoryId {
get {
return this.categoryIdField;
}
set {
this.categoryIdField = value;
this.RaisePropertyChanged("categoryId");
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(Order=1)]
public string categoryName {
get {
return this.categoryNameField;
}
set {
this.categoryNameField = value;
this.RaisePropertyChanged("categoryName");
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment