Exemplo n.º 1
0
 /// <summary>
 /// Initalizes the factory. Before initialize is called,
 /// the factory in non-usable.
 /// </summary>
 internal void Initalize(SerializerFactoryConfig config,
                         IiopUrlUtil iiopUrlUtil)
 {
     m_config      = config;
     m_iiopUrlUtil = iiopUrlUtil;
     // the following depend on the config
     m_wideStringSer =
         new StringSerializer(true, config.StringSerializationAllowNull);
     m_nonWideStringSer =
         new StringSerializer(false, config.StringSerializationAllowNull);
 }
Exemplo n.º 2
0
        /// <summary>
        /// The default constructor.
        /// </summary>
        /// <remarks>Call Initalize, before using the factory.</remarks>
        internal SerializerFactory()
        {
            m_anySerForObject  = new AnySerializer(this, false);
            m_anySerForAnyCont = new AnySerializer(this, true);
            m_typeSer          = new TypeSerializer(this);
            m_typeCodeSer      = new TypeCodeSerializer(this);

            m_exceptionSer = new ExceptionSerializer(this);

            m_boxedWstringValueSer = new BoxedValueSerializer(ReflectionHelper.WStringValueType,
                                                              false, this);

            m_boxedStringValueSer = new BoxedValueSerializer(ReflectionHelper.StringValueType,
                                                             false, this);

            // to create the iiop url util, the factory is already used before initalized,
            // therefore create a dummy config until then
            m_config        = new SerializerFactoryConfig();
            m_wideStringSer =
                new StringSerializer(true, m_config.StringSerializationAllowNull);
            m_nonWideStringSer =
                new StringSerializer(false, m_config.StringSerializationAllowNull);
        }
 /// <summary>
 /// Initalizes the factory. Before initialize is called,
 /// the factory in non-usable.
 /// </summary>
 internal void Initalize(SerializerFactoryConfig config,
                         IiopUrlUtil iiopUrlUtil) {
     m_config = config;
     m_iiopUrlUtil = iiopUrlUtil;
     // the following depend on the config
     m_wideStringSer = 
         new StringSerializer(true, config.StringSerializationAllowNull);
     m_nonWideStringSer = 
         new StringSerializer(false, config.StringSerializationAllowNull);
 }
        /// <summary>
        /// The default constructor.
        /// </summary>
        /// <remarks>Call Initalize, before using the factory.</remarks>
        internal SerializerFactory() {
            m_anySerForObject = new AnySerializer(this, false);
            m_anySerForAnyCont = new AnySerializer(this, true);
            m_typeSer = new TypeSerializer(this);
            m_typeCodeSer = new TypeCodeSerializer(this);

            m_exceptionSer = new ExceptionSerializer(this);

            m_boxedWstringValueSer = new BoxedValueSerializer(ReflectionHelper.WStringValueType, 
                                                              false, this);

            m_boxedStringValueSer = new BoxedValueSerializer(ReflectionHelper.StringValueType,
                                                             false, this);

            // to create the iiop url util, the factory is already used before initalized, 
            // therefore create a dummy config until then
            m_config = new SerializerFactoryConfig();
            m_wideStringSer = 
                new StringSerializer(true, m_config.StringSerializationAllowNull);
            m_nonWideStringSer = 
                new StringSerializer(false, m_config.StringSerializationAllowNull);
        }