예제 #1
0
        public SerializationConfig AddDataSerializableFactoryClass(int factoryId, Type dataSerializableFactoryClass)
        {
            var factoryClassName = ValidationUtil.IsNotNull(dataSerializableFactoryClass, "dataSerializableFactoryClass")
                                   .AssemblyQualifiedName;

            return(AddDataSerializableFactoryClass(factoryId, factoryClassName));
        }
        /// <summary>
        /// Adds a <see cref="IPortableFactory"/> mapped with a factory id to be registered
        /// </summary>
        /// <param name="factoryId">factory ID of <see cref="IPortableFactory"/> to be registered</param>
        /// <param name="portableFactoryClass">Type of the factory</param>
        /// <returns>configured <see cref="SerializationConfig"/> for chaining</returns>
        public virtual SerializationConfig AddPortableFactoryClass(int factoryId, Type portableFactoryClass)
        {
            var portableFactoryClassName =
                ValidationUtil.IsNotNull(portableFactoryClass, "portableFactoryClass").AssemblyQualifiedName;

            return(AddPortableFactoryClass(factoryId, portableFactoryClassName));
        }
예제 #3
0
        public virtual SerializationConfig AddDataSerializableFactoryClass(int factoryId,
                                                                           Type dataSerializableFactoryClass)
        {
            string factoryClassName =
                ValidationUtil.IsNotNull(dataSerializableFactoryClass, "dataSerializableFactoryClass").FullName;

            return(AddDataSerializableFactoryClass(factoryId, factoryClassName));
        }
예제 #4
0
        public ICollection <TResult> Project <TResult>(IProjection projection)
        {
            ValidationUtil.IsNotNull(projection, "projection");
            var request          = MapProjectCodec.EncodeRequest(GetName(), ToData(projection));
            var response         = Invoke(request);
            var resultParameters = MapProjectCodec.DecodeResponse(response);

            return(new ReadOnlyLazyList <TResult, IData>(resultParameters.response, GetContext().GetSerializationService()));
        }
예제 #5
0
        public TResult Aggregate <TResult>(IAggregator <TResult> aggregator)
        {
            ValidationUtil.IsNotNull(aggregator, "aggregator");
            var request          = MapAggregateCodec.EncodeRequest(GetName(), ToData(aggregator));
            var response         = Invoke(request);
            var resultParameters = MapAggregateCodec.DecodeResponse(response);

            return(ToObject <TResult>(resultParameters.response));
        }
 /// <summary>Creates a ListenerConfig with the given implementation.</summary>
 /// <remarks>Creates a ListenerConfig with the given implementation.</remarks>
 /// <param name="implementation">the implementation to use as IEventListener.</param>
 /// <exception cref="System.ArgumentException">if the implementation is null.</exception>
 public ListenerConfig(IEventListener implementation)
 {
     this.implementation = ValidationUtil.IsNotNull(implementation, "implementation");
 }
 /// <summary>Sets the IEventListener implementation.</summary>
 /// <remarks>
 ///     Sets the IEventListener implementation.
 ///     If a className was set, it will be removed.
 /// </remarks>
 /// <param name="implementation">the IEventListener implementation.</param>
 /// <returns>the updated ListenerConfig.</returns>
 /// <exception cref="System.ArgumentException">the implementation is null.</exception>
 /// <seealso cref="SetClassName(string)">SetClassName(string)</seealso>
 /// <seealso cref="GetImplementation()">GetImplementation()</seealso>
 public virtual ListenerConfig SetImplementation(IEventListener implementation)
 {
     this.implementation = ValidationUtil.IsNotNull(implementation, "implementation");
     className           = null;
     return(this);
 }
 /// <summary>Sets the password.</summary>
 /// <remarks>Sets the password.</remarks>
 /// <param name="password">the password to set</param>
 /// <returns>the updated GroupConfig.</returns>
 /// <exception cref="System.ArgumentException">if password is null.</exception>
 public GroupConfig SetPassword(string password)
 {
     this.password = ValidationUtil.IsNotNull(password, "group password");
     return(this);
 }
 /// <summary>Sets the group name.</summary>
 /// <remarks>Sets the group name.</remarks>
 /// <param name="name">the name to set</param>
 /// <returns>the updated GroupConfig.</returns>
 /// <exception cref="System.ArgumentException">if name is null.</exception>
 public GroupConfig SetName(string name)
 {
     this.name = ValidationUtil.IsNotNull(name, "group name");
     return(this);
 }