Beispiel #1
0
 protected BindableObjectClassWithIdentity(
     Type concreteType,
     BindableObjectProvider businessObjectProvider,
     IEnumerable <PropertyBase> properties)
     : this(concreteType, businessObjectProvider, SafeServiceLocator.Current.GetInstance <BindableObjectGlobalizationService>(), properties)
 {
 }
Beispiel #2
0
        public virtual IClassReflector CreateClassReflector(Type targetType, BindableObjectProvider businessObjectProvider)
        {
            ArgumentUtility.CheckNotNull("targetType", targetType);
            ArgumentUtility.CheckNotNull("businessObjectProvider", businessObjectProvider);

            return(new ClassReflector(targetType, businessObjectProvider, this, _bindableObjectGlobalizationService));
        }
Beispiel #3
0
 public BindableObjectClassWithIdentity(
     Type concreteType,
     BindableObjectProvider businessObjectProvider,
     BindableObjectGlobalizationService bindableObjectGlobalizationService,
     IEnumerable <PropertyBase> properties)
     : base(concreteType, businessObjectProvider, bindableObjectGlobalizationService, properties)
 {
     _getObjectServiceType = GetGetObjectServiceType();
 }
Beispiel #4
0
        public virtual PropertyReflector CreatePropertyReflector(
            Type concreteType, IPropertyInformation propertyInfo, BindableObjectProvider businessObjectProvider)
        {
            ArgumentUtility.CheckNotNull("concreteType", concreteType);
            ArgumentUtility.CheckNotNull("propertyInfo", propertyInfo);
            ArgumentUtility.CheckNotNull("businessObjectProvider", businessObjectProvider);

            return(PropertyReflector.Create(propertyInfo, businessObjectProvider));
        }
        protected override void OnDeserialized()
        {
            base.OnDeserialized();

            var typeForBindableObjectClass = GetTypeForBindableObjectClass();

            _mixinConfigurationAtInstantiationTime = MixinConfiguration.ActiveConfiguration;
            _bindableObjectProvider = BindableObjectProvider.GetProviderForBindableObjectType(typeForBindableObjectClass);
            _bindableObjectClass    = new DoubleCheckedLockingContainer <BindableObjectClass> (InitializeBindableObjectClass);
        }
        private BindableObjectClass GetBindableObjectClass()
        {
            var type = GetType();

            if (type == null)
            {
                return(null);
            }

            if (_bindableObjectClass == null)
            {
                var provider = BindableObjectProvider.GetProviderForBindableObjectType(type);
                _bindableObjectClass = provider.GetBindableObjectClass(type);
            }

            return(_bindableObjectClass);
        }
Beispiel #7
0
        public ClassReflector(
            Type targetType,
            BindableObjectProvider businessObjectProvider,
            IMetadataFactory metadataFactory,
            BindableObjectGlobalizationService bindableObjectGlobalizationService)
        {
            ArgumentUtility.CheckNotNull("targetType", targetType);
            ArgumentUtility.CheckNotNull("businessObjectProvider", businessObjectProvider);
            ArgumentUtility.CheckNotNull("metadataFactory", metadataFactory);
            ArgumentUtility.CheckNotNull("bindableObjectGlobalizationService", bindableObjectGlobalizationService);

            _targetType                         = targetType;
            _concreteType                       = BindableObjectProvider.GetConcreteTypeForBindableObjectImplementation(_targetType);
            _businessObjectProvider             = businessObjectProvider;
            _metadataFactory                    = metadataFactory;
            _bindableObjectGlobalizationService = bindableObjectGlobalizationService;
        }
Beispiel #8
0
        public BindableObjectClass(
            Type concreteType,
            BindableObjectProvider businessObjectProvider,
            BindableObjectGlobalizationService bindableObjectGlobalizationService,
            IEnumerable <PropertyBase> properties)
        {
            ArgumentUtility.CheckNotNull("concreteType", concreteType);
            Assertion.IsFalse(concreteType.IsValueType, "mixed types cannot be value types");
            ArgumentUtility.CheckNotNull("businessObjectProvider", businessObjectProvider);
            ArgumentUtility.CheckNotNull("bindableObjectGlobalizationService", bindableObjectGlobalizationService);
            ArgumentUtility.CheckNotNull("properties", properties);

            _targetType                         = MixinTypeUtility.GetUnderlyingTargetType(concreteType);
            _concreteType                       = concreteType;
            _businessObjectProvider             = businessObjectProvider;
            _businessObjectProviderAttribute    = AttributeUtility.GetCustomAttribute <BusinessObjectProviderAttribute> (concreteType, true);
            _properties                         = new PropertyCollection(properties);
            _bindableObjectGlobalizationService = bindableObjectGlobalizationService;

            foreach (PropertyBase property in _properties.ToArray())
            {
                property.SetReflectedClass(this);
            }
        }
Beispiel #9
0
 public static void SetCurrent(BindableObjectProvider provider)
 {
     throw new NotImplementedException("Obsolete. Use BusinessObjectProvider.GetProvider instead. (Version 1.9.1.0)");
 }