예제 #1
0
        /// <summary>Initializes a new instance of the <see cref="SupportEventTypeFactory"/> class.</summary>
        /// <param name="container">The container.</param>
        public SupportEventTypeFactory(IContainer container)
        {
            Container = container;

            STEM_BUILDER = new BeanEventTypeStemBuilder(null, PropertyResolutionStyle.CASE_SENSITIVE);

            BEAN_STEM_SVC = new BeanEventTypeStemService(
                null, null, PropertyResolutionStyle.CASE_SENSITIVE, AccessorStyle.NATIVE);

            BEAN_EVENT_TYPE_FACTORY = new BeanEventTypeFactoryPrivate(
                new EventBeanTypedEventFactoryRuntime(null),
                EventTypeFactoryImpl.GetInstance(container),
                BEAN_STEM_SVC);

            METADATA_CLASS = name => new EventTypeMetadata(
                name, null,
                EventTypeTypeClass.STREAM,
                EventTypeApplicationType.CLASS,
                NameAccessModifier.INTERNAL,
                EventTypeBusModifier.NONBUS,
                false,
                EventTypeIdPair.Unassigned());

            SUPPORTBEAN_EVENTTTPE = MakeType(typeof(SupportBean));
            SUPPORTBEAN_S0_EVENTTTPE = MakeType(typeof(SupportBean_S0));
            SUPPORTBEAN_S1_EVENTTTPE = MakeType(typeof(SupportBean_S1));
            SUPPORTBEAN_S2_EVENTTTPE = MakeType(typeof(SupportBean_S2));
            SUPPORTBEAN_A_EVENTTTPE = MakeType(typeof(SupportBean_A));
            SUPPORTBEANCOMPLEXPROPS_EVENTTTPE = MakeType(typeof(SupportBeanComplexProps));
            SUPPORTBEANSIMPLE_EVENTTTPE = MakeType(typeof(SupportBeanSimple));
        }
예제 #2
0
        private SupportEventTypeFactory(IContainer container)
        {
            _container = container;

            STEM_BUILDER = new BeanEventTypeStemBuilder(
                null,
                PropertyResolutionStyle.CASE_SENSITIVE);

            BEAN_STEM_SVC = new BeanEventTypeStemService(
                null,
                null,
                PropertyResolutionStyle.CASE_SENSITIVE,
                AccessorStyle.NATIVE);

            BEAN_EVENT_TYPE_FACTORY = new BeanEventTypeFactoryPrivate(
                new EventBeanTypedEventFactoryRuntime(null),
                EventTypeFactoryImpl.GetInstance(container),
                BEAN_STEM_SVC);

            METADATA_CLASS = name => new EventTypeMetadata(
                name,
                null,
                EventTypeTypeClass.STREAM,
                EventTypeApplicationType.CLASS,
                NameAccessModifier.INTERNAL,
                EventTypeBusModifier.NONBUS,
                false,
                EventTypeIdPair.Unassigned());

            SUPPORTBEAN_EVENTTTPE                       = MakeType(typeof(SupportBean));
            SUPPORTBEAN_S0_EVENTTTPE                    = MakeType(typeof(SupportBean_S0));
            SUPPORTBEAN_S1_EVENTTTPE                    = MakeType(typeof(SupportBean_S1));
            SUPPORTBEAN_S2_EVENTTTPE                    = MakeType(typeof(SupportBean_S2));
            SUPPORTBEAN_S3_EVENTTTPE                    = MakeType(typeof(SupportBean_S3));
            SUPPORTBEAN_S4_EVENTTTPE                    = MakeType(typeof(SupportBean_S4));
            SUPPORTBEAN_A_EVENTTTPE                     = MakeType(typeof(SupportBean_A));
            SUPPORTMARKETDATABEAN_EVENTTTPE             = MakeType(typeof(SupportMarketDataBean));
            SUPPORTBEANSTRING_EVENTTTPE                 = MakeType(typeof(SupportBeanString));
            SUPPORTBEANCOMPLEXPROPS_EVENTTTPE           = MakeType(typeof(SupportBeanComplexProps));
            SUPPORTLEGACYBEAN_EVENTTTPE                 = MakeType(typeof(SupportLegacyBean));
            SUPPORTBEANCOMBINEDPROPS_EVENTTTPE          = MakeType(typeof(SupportBeanCombinedProps));
            SUPPORTBEANPROPERTYNAMES_EVENTTTPE          = MakeType(typeof(SupportBeanPropertyNames));
            SUPPORTBEANSIMPLE_EVENTTTPE                 = MakeType(typeof(SupportBeanSimple));
            SUPPORTBEANITERABLEPROPS_EVENTTTPE          = MakeType(typeof(SupportBeanIterableProps));
            SUPPORTABCDEEVENT_EVENTTTPE                 = MakeType(typeof(SupportABCDEEvent));
            SUPPORTBEANITERABLEPROPSCONTAINER_EVENTTYPE = MakeType(typeof(SupportBeanIterablePropsContainer));
        }
예제 #3
0
        public BeanEventTypeStem GetCreateStem(
            Type clazz,
            ConfigurationCommonEventTypeBean optionalConfiguration)
        {
            var stem = _stems.Get(clazz);
            if (stem != null) {
                return stem;
            }

            if (optionalConfiguration == null && _defaultAccessorStyle != AccessorStyle.NATIVE) {
                optionalConfiguration = new ConfigurationCommonEventTypeBean();
                optionalConfiguration.AccessorStyle = _defaultAccessorStyle;
            }

            stem = new BeanEventTypeStemBuilder(optionalConfiguration, _defaultPropertyResolutionStyle).Make(clazz);
            _stems.Put(clazz, stem);
            return stem;
        }