modules/platforms/dotnet/Apache.Ignite.Core/Impl/Services/ServiceProxySerializer.cs
/// <summary>
/// Writes proxy method invocation data to the specified writer.
/// </summary>
/// <param name="writer">Writer.</param>
/// <param name="methodName">Name of the method.</param>
/// <param name="method">Method (optional, can be null).</param>
/// <param name="arguments">Arguments.</param>
/// <param name="platform">The platform.</param>
Writes proxy method invocation data to the specified writer.
Writes proxy method invocation data to the specified writer .
public static void WriteProxyMethod(BinaryWriter writer, string methodName, MethodBase method,
            object[] arguments, Platform platform)
        {
            Debug.Assert(writer != null);
            writer.WriteString(methodName);
            if (arguments != null)
            {
                writer.WriteBoolean(true);
                writer.WriteInt(arguments.Length);
                if (platform == Platform.DotNet)
                {
                    foreach (var arg in arguments)
                    {
                        writer.WriteObjectDetached(arg);
                    }
                }
                else
                {
                    var mParams = method != null ? method.GetParameters() : null;
                    Debug.Assert(mParams == null || mParams.Length == arguments.Length);
                    for (var i = 0; i < arguments.Length; i++)
                    {
                        WriteArgForPlatforms(writer, mParams != null ? mParams[i].ParameterType : null, arguments[i]);
                    }
                }
            }
            else
                writer.WriteBoolean(false);
        }
public static void WriteProxyMethod ( BinaryWriter writer , string methodName , MethodBase method , object [ ] arguments , Platform platform ) { Debug . Assert ( writer != null ) ; writer . WriteString ( methodName ) ; if ( arguments != null ) { writer . WriteBoolean ( true ) ; writer . WriteInt ( arguments . Length ) ; if ( platform == Platform . DotNet ) { foreach ( var arg in arguments ) { writer . WriteObjectDetached ( arg ) ; } } else { var mParams = method != null ? method . GetParameters ( ) : null ; Debug . Assert ( mParams == null || mParams . Length == arguments . Length ) ; for ( var i = 0 ; i < arguments . Length ; i ++ ) { WriteArgForPlatforms ( writer , mParams != null ? mParams [ i ] . ParameterType : null , arguments [ i ] ) ; } } } else writer . WriteBoolean ( false ) ; }
Writes proxy method invocation data to the specified writer.
Writes proxy method invocation data to the specified writer .
// Write as is for .NET. // Other platforms do not support Serializable, need to convert arrays and collections
writer
BinaryWriter
None
methodName
string
Name of the method.
Name of the method .
method
MethodBase
Method (optional, can be null).
Method ( optional can be null ) .
arguments
object[]
None
platform
Platform
None