Sage.Integration.Northwind.Etag.PayloadEtagSerializer.Serialize C# (CSharp) Method

Serialize() public method

public Serialize ( object obj ) : string
obj object must be of type .
return string
        public string Serialize(object obj)
        {
            // if obj == null -> append null value and return
            if (null == obj)
                return NULL;

            FeedEntry payloadObj = obj as FeedEntry;

            if (null == payloadObj)
                throw new ArgumentException(string.Format("The object given must implement {0}.", typeof(FeedEntry).FullName), "obj");


#warning WORKAROUND: Problems with enum types
            try
            {
                //object compositeObj = this.GetPayloadObject(payloadObj);

                // serialize the composite payload object
                return this.SerializeCompositeObject(payloadObj);
            }
            catch
            {
                return "";
            }
        }