示例#1
0
 public AssemblyFunctionArguments(
     IStringEncodingConfiguration stringEncodingConfig,
     IAssemblyDelegate assemblyDelegate,
     ISerializableObject arguments)
 {
     _assemblyDelegate     = assemblyDelegate ?? throw new ArgumentNullException(nameof(assemblyDelegate));
     _arguments            = arguments ?? throw new ArgumentNullException(nameof(arguments));
     _stringEncodingConfig = stringEncodingConfig ?? throw new ArgumentNullException(nameof(stringEncodingConfig));
 }
        public FunctionCallArguments(IAssemblyDelegate assemblyDelegate, IBinarySerializer arguments)
        {
            if (assemblyDelegate == null)
            {
                throw new ArgumentNullException(nameof(assemblyDelegate));
            }

            Assembly = PathEncoding.GetBytes(assemblyDelegate.AssemblyName.PadRight(FunctionNameMax, PaddingCharacter));
            Class    = PathEncoding.GetBytes($"{assemblyDelegate.AssemblyName}.{assemblyDelegate.TypeName}".PadRight(FunctionNameMax, PaddingCharacter));
            Function = PathEncoding.GetBytes(assemblyDelegate.MethodName.PadRight(FunctionNameMax, PaddingCharacter));

            Arguments = arguments.Serialize();
        }