protected InstanceBuilderContextBase(IPlatform platform, IDocumentContext documentContext, IDocumentRootResolver documentRootResolver, IViewRootResolver viewRootResolver, ITypeMetadataFactory metadataFactory, INameScope nameScope, IInstanceBuilderContext parentContext, bool useShadowProperties, ITextBufferService textBufferService, DocumentNode alternateSiteNode) { this.documentContext = documentContext; this.platform = platform; this.effectManager = platform.EffectManager; this.instanceBuilderFactory = platform.InstanceBuilderFactory; this.documentRootResolver = documentRootResolver; this.viewRootResolver = viewRootResolver; this.metadataFactory = metadataFactory; this.AllowPostponingResourceEvaluation = true; this.viewNodeManager = this.platform.Create(); this.viewNodeManager.Initialize(this); this.userControlInstances = new HashSet <ViewNode>(); this.currentlyInstantiatingUserControlPreviews = new HashSet <string>(); this.instanceDictionary = this.platform.CreateInstanceDictionary(this.viewNodeManager); this.exceptionDictionary = new Microsoft.Expression.DesignModel.InstanceBuilders.ExceptionDictionary(this.viewNodeManager); this.warningDictionary = new Microsoft.Expression.DesignModel.InstanceBuilders.WarningDictionary(this.viewNodeManager); this.nameScope = nameScope; this.useShadowProperties = useShadowProperties; this.shouldRegisterInstantiatedElements = true; this.parentContext = parentContext; this.textBufferService = textBufferService; this.alternateSiteNode = alternateSiteNode; }
public static void AddWarning <M, P>(this IWarningDictionary <M> v, Expression <Func <M, P> > exp, string errorMessage) { (v as IWarningDictionary).AddWarning(GetName(exp), errorMessage); }