modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxySerializer.cs
/// <summary>
/// Gets arg writer for platform-compatible service calls.
/// </summary>
Gets arg writer for platform-compatible service calls.
Gets arg writer for platform - compatible service calls .
private static Action<BinaryWriter, object> GetPlatformArgWriter(Type paramType, object arg)
        {
            if (arg == null)
            {
                return null;
            }
            var type = paramType ?? arg.GetType();
            type = Nullable.GetUnderlyingType(type) ?? type;
            if (type.IsPrimitive)
                return null;
            var handler = BinarySystemHandlers.GetWriteHandler(type);
            if (handler != null)
                return null;
            if (type.IsArray)
                return (writer, o) => writer.WriteArrayInternal((Array) o);
            if (arg is ICollection)
                return (writer, o) => writer.WriteCollection((ICollection) o);
            return null;
        }
private static Action < BinaryWriter , object > GetPlatformArgWriter ( Type paramType , object arg ) { if ( arg == null ) { return null ; } var type = paramType ?? arg . GetType ( ) ; type = Nullable . GetUnderlyingType ( type ) ?? type ; if ( type . IsPrimitive ) return null ; var handler = BinarySystemHandlers . GetWriteHandler ( type ) ; if ( handler != null ) return null ; if ( type . IsArray ) return ( writer , o ) => writer . WriteArrayInternal ( ( Array ) o ) ; if ( arg is ICollection ) return ( writer , o ) => writer . WriteCollection ( ( ICollection ) o ) ; return null ; }
Gets arg writer for platform-compatible service calls.
Gets arg writer for platform - compatible service calls .
// Unwrap nullable
paramType
Type
arg
object