コード例 #1
0
        public static IXCustomFeature CreateCustomFeature <TDef>(this IXFeatureRepository feats)
            where TDef : IXCustomFeatureDefinition
        {
            var custFeat = feats.PreCreateCustomFeature();

            custFeat.DefinitionType = typeof(TDef);
            feats.Add(custFeat);

            return(custFeat);
        }
コード例 #2
0
        public static IXCustomFeature <TParams> CreateCustomFeature <TDef, TParams>(this IXFeatureRepository feats, TParams param)
            where TParams : class, new()
            where TDef : IXCustomFeatureDefinition <TParams>
        {
            var custFeat = feats.PreCreateCustomFeature <TParams>();

            custFeat.DefinitionType = typeof(TDef);
            custFeat.Parameters     = param;
            feats.Add(custFeat);

            return(custFeat);
        }