示例#1
0
        public IBindableModelBuilder WithOptionalDependency(INavigatableElementBuilder navigatableElementBuilder, IStructuralProperty dependency)
        {
            var declaration = new DependencyDeclaration(dependency, true);

            this.dependencies.Add(new KeyValuePair <INavigatableElementBuilder, DependencyDeclaration>(navigatableElementBuilder, declaration));
            return(this);
        }
示例#2
0
        public bool TryGetBinding <T>(INavigatableElementBuilder navigatableElementBuilder, out T binding) where T : class, IBinding
        {
            IBinding bindingValue;

            if (this.bindings.TryGetValue(navigatableElementBuilder, out bindingValue))
            {
                binding = bindingValue as T;
                return(binding != null);
            }

            binding = null;
            return(false);
        }
示例#3
0
 public IModelBuilder WithOperationHandler(INavigatableElementBuilder navigatableElementBuilder, IOperationHandler operationHandler)
 => this.underlyingModelBuilder.WithOperationHandler(navigatableElementBuilder, operationHandler);
示例#4
0
 public IBindableModelBuilder WithBinding(INavigatableElementBuilder navigatableElementBuilder, IBinding binding)
 {
     this.bindings[navigatableElementBuilder] = binding;
     return(this);
 }
示例#5
0
 public IModelBuilder WithOperationHandler(INavigatableElementBuilder navigatableElementBuilder, IOperationHandler operationHandler)
 {
     this.operationHandlers.Add(new KeyValuePair <INavigatableElementBuilder, IOperationHandler>(navigatableElementBuilder, operationHandler));
     return(this);
 }