public override void write( object obj, IProtocolFormatter writer ) { //IDictionary propertyBag = (IDictionary) obj; IDictionary props = (IDictionary) obj; string clientClass = GetClientClass(props); #if FULL_BUILD props = new SortedList(props); #endif writer.GetObjectSerializer().WriteObject( clientClass, props, writer ); }
public override void write(object obj, IProtocolFormatter writer) { //IDictionary propertyBag = (IDictionary) obj; IDictionary props = (IDictionary)obj; string clientClass = GetClientClass(props); #if FULL_BUILD props = new SortedList(props); #endif writer.GetObjectSerializer().WriteObject(clientClass, props, writer); }
public override void write( object obj, IProtocolFormatter formatter ) { ServiceException exception = (ServiceException)obj; Dictionary<String, Object> objectFields = new Dictionary<String, Object>(); objectFields[ "description" ] = exception.description; objectFields[ "details" ] = exception.details; objectFields[ "type" ] = exception.type; objectFields[ "code" ] = exception.code; String className = exception.exceptionName; formatter.GetObjectSerializer().WriteObject( className, objectFields, formatter ); }
public override void write(object obj, IProtocolFormatter formatter) { ServiceException exception = (ServiceException)obj; Dictionary <String, Object> objectFields = new Dictionary <String, Object>(); objectFields["description"] = exception.description; objectFields["details"] = exception.details; objectFields["type"] = exception.type; objectFields["code"] = exception.code; String className = exception.exceptionName; formatter.GetObjectSerializer().WriteObject(className, objectFields, formatter); }
public override void write( object obj, IProtocolFormatter writer ) { IWebORBArrayCollection collection = (IWebORBArrayCollection) obj; List<Object> array = new List<Object>(); IEnumerator en = collection.GetEnumerator(); while( en.MoveNext() ) array.Add( en.Current ); Dictionary<String, object> fields = new Dictionary<String, object>(); fields[ "source" ] = array.ToArray(); writer.GetObjectSerializer().WriteObject( "flex.messaging.io.ArrayCollection", fields, writer ); }
public override void write(object obj, IProtocolFormatter writer) { IWebORBArrayCollection collection = (IWebORBArrayCollection)obj; List <Object> array = new List <Object>(); IEnumerator en = collection.GetEnumerator(); while (en.MoveNext()) { array.Add(en.Current); } Dictionary <String, object> fields = new Dictionary <String, object>(); fields["source"] = array.ToArray(); writer.GetObjectSerializer().WriteObject("flex.messaging.io.ArrayCollection", fields, writer); }
protected override void onWriteObject( object obj, string className, IDictionary objectFields, IProtocolFormatter writer ) { IDictionary<string, object> underflowData = UnderflowStore.GetObjectUnderflow( obj ); if( underflowData != null ) { int lastIndex = className.LastIndexOf( '.' ); if( lastIndex > -1 ) className = className.Substring( lastIndex + 1 ); foreach( string key in underflowData.Keys ) if( !objectFields.Contains( key ) && underflowData[ key ] != null ) objectFields[ key ] = underflowData[ key ]; } writer.GetObjectSerializer().WriteObject( className, objectFields, writer ); }
protected override void onWriteObject( object obj, string className, IDictionary objectFields, IProtocolFormatter writer ) { IDictionary<string, object> underflowData = UnderflowStore.GetObjectUnderflow( obj ); if( underflowData != null ) { int lastIndex = className.LastIndexOf( '.' ); if( lastIndex > -1 ) className = className.Substring( lastIndex + 1 ); foreach( string key in underflowData.Keys ) if( !objectFields.Contains( key ) && underflowData[ key ] != null ) objectFields[ key ] = underflowData[ key ]; } if( !className.StartsWith( "flex.messaging.messages" ) && !className.StartsWith( "com.backendless" ) ) { if( objectFields.Contains( "___class" ) ) className = (String) objectFields[ "___class" ]; else { int dotIndex = className.LastIndexOf( '+' ); if( dotIndex == -1 ) dotIndex = className.LastIndexOf( '.' ); if( dotIndex > -1 ) className = className.Substring( dotIndex + 1 ); objectFields.Add( "___class", className ); } className = null; } writer.GetObjectSerializer().WriteObject( className, objectFields, writer ); }
public override void write( object obj, IProtocolFormatter formatter ) { TypedObject typedObject = (TypedObject) obj; formatter.GetObjectSerializer().WriteObject( typedObject.typeName, typedObject.objectData, formatter ); }
public override void write(object obj, IProtocolFormatter formatter) { TypedObject typedObject = (TypedObject)obj; formatter.GetObjectSerializer().WriteObject(typedObject.typeName, typedObject.objectData, formatter); }
protected virtual void onWriteObject(Object obj, string className, IDictionary objectFields, IProtocolFormatter writer) { writer.GetObjectSerializer().WriteObject(className, objectFields, writer); }