public static IXCustomFeature CreateCustomFeature <TDef>(this IXFeatureRepository feats) where TDef : IXCustomFeatureDefinition { var custFeat = feats.PreCreateCustomFeature(); custFeat.DefinitionType = typeof(TDef); feats.Add(custFeat); return(custFeat); }
internal SwDocument(IModelDoc2 model, ISldWorks app, ILogger logger) { Model = model; m_App = app; m_Logger = logger; Features = new SwFeatureManager(this, model.FeatureManager, m_App); AttachEvents(); }
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); }