public IBindableModelBuilder WithOptionalDependency(INavigatableElementBuilder navigatableElementBuilder, IStructuralProperty dependency) { var declaration = new DependencyDeclaration(dependency, true); this.dependencies.Add(new KeyValuePair <INavigatableElementBuilder, DependencyDeclaration>(navigatableElementBuilder, declaration)); return(this); }
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); }
public IModelBuilder WithOperationHandler(INavigatableElementBuilder navigatableElementBuilder, IOperationHandler operationHandler) => this.underlyingModelBuilder.WithOperationHandler(navigatableElementBuilder, operationHandler);
public IBindableModelBuilder WithBinding(INavigatableElementBuilder navigatableElementBuilder, IBinding binding) { this.bindings[navigatableElementBuilder] = binding; return(this); }
public IModelBuilder WithOperationHandler(INavigatableElementBuilder navigatableElementBuilder, IOperationHandler operationHandler) { this.operationHandlers.Add(new KeyValuePair <INavigatableElementBuilder, IOperationHandler>(navigatableElementBuilder, operationHandler)); return(this); }