コード例 #1
0
            // returns whether or not Initialize returned true, feature is always set when the thing exists
            public bool TryCreate(out Feature feature)
            {
                if (type == null)
                {
                    if (!featureTypes.TryGetValue(Name, out type))
                    {
                        feature = new EmptyFeature()
                        {
                            InvalidMessage = "No such feature type found", FeatureName = Name
                        };
                        return(false);
                    }
                }

                bool result;

                try
                {
                    feature             = (Feature)Activator.CreateInstance(type);
                    feature.FeatureName = Name;

                    result = feature.Initialize(AppliedTo, Data);
                }
                catch (Exception e)
                {
                    result  = false;
                    feature = new EmptyFeature()
                    {
                        InvalidMessage = e.ToString(), FeatureName = Name
                    };
                }
                return(result);
            }
コード例 #2
0
        private void InitialiseMembers()
        {
            CurrentImport          = new EmptyImportQueue();
            CurrentException       = new EmptyImportError();
            CurrentAction          = enums.ImportAction.NotSet;
            CurrentFeatureGroup    = string.Empty;
            CurrentFeatureSubGroup = new EmptyFeatureGroup();
            CurrentFeature         = new EmptyFeature();
            CurrentMarket          = new EmptyMarket();

            AvailableDocuments         = Enumerable.Empty <OXODoc>();
            AvailableEngines           = Enumerable.Empty <ModelEngine>();
            AvailableTransmissions     = Enumerable.Empty <ModelTransmission>();
            AvailableBodies            = Enumerable.Empty <ModelBody>();
            AvailableTrim              = Enumerable.Empty <OxoTrim>();
            AvailableSpecialFeatures   = Enumerable.Empty <SpecialFeature>();
            AvailableMarkets           = Enumerable.Empty <Market>();
            AvailableFeatures          = Enumerable.Empty <FdpFeature>();
            AvailableFeatureGroups     = Enumerable.Empty <FeatureGroup>();
            AvailableDerivatives       = Enumerable.Empty <Derivative>();
            AvailableImportDerivatives = Enumerable.Empty <ImportDerivative>();
            AvailableImportTrimLevels  = Enumerable.Empty <ImportTrim>();
            AvailableExceptionTypes    = Enumerable.Empty <ImportExceptionType>();
            AvailableImportStatuses    = Enumerable.Empty <ImportStatus>();
            AvailableTrimLevels        = Enumerable.Empty <TrimLevel>();

            IdentifierPrefix = "Page";
        }
コード例 #3
0
        private void InitialiseMembers()
        {
 	        CurrentImport = new EmptyImportQueue();
            CurrentException = new EmptyImportError();
            CurrentAction = enums.ImportAction.NotSet;
            CurrentFeatureGroup = string.Empty;
            CurrentFeatureSubGroup = new EmptyFeatureGroup();
            CurrentFeature = new EmptyFeature();
            CurrentMarket = new EmptyMarket();

            AvailableDocuments = Enumerable.Empty<OXODoc>();
            AvailableEngines = Enumerable.Empty<ModelEngine>();
            AvailableTransmissions = Enumerable.Empty<ModelTransmission>();
            AvailableBodies = Enumerable.Empty<ModelBody>();
            AvailableTrim = Enumerable.Empty<OxoTrim>();
            AvailableSpecialFeatures  = Enumerable.Empty<SpecialFeature>();
            AvailableMarkets = Enumerable.Empty<Market>();
            AvailableFeatures = Enumerable.Empty<FdpFeature>();
            AvailableFeatureGroups = Enumerable.Empty<FeatureGroup>();
            AvailableDerivatives = Enumerable.Empty<Derivative>();
            AvailableImportDerivatives = Enumerable.Empty<ImportDerivative>();
            AvailableImportTrimLevels = Enumerable.Empty<ImportTrim>();
            AvailableExceptionTypes = Enumerable.Empty<ImportExceptionType>();
            AvailableImportStatuses = Enumerable.Empty<ImportStatus>();
            AvailableTrimLevels = Enumerable.Empty<TrimLevel>();

            IdentifierPrefix = "Page";
        }
コード例 #4
0
 public FeatureMapping()
 {
     MappedFeature = new EmptyFeature();
     IsActive      = true;
 }
コード例 #5
0
 public FeatureMapping()
 {
     MappedFeature = new EmptyFeature();
     IsActive = true;
 }