/// <summary> /// Identifies assemblies that may include custom resource types as well adding the /// program assembly so the controller endpoints can also be discovered. This method /// adds these assemblies to the <see cref="IOperatorBuilder"/> passed. /// </summary> /// <param name="operatorBuilder">The target operator builder.</param> internal static void AddResourceAssemblies(IOperatorBuilder operatorBuilder) { Covenant.Requires <ArgumentNullException>(operatorBuilder != null, nameof(operatorBuilder)); operatorBuilder.AddResourceAssembly(Assembly.GetExecutingAssembly()); operatorBuilder.AddResourceAssembly(typeof(Neon.Kube.ResourceDefinitions.Stub).Assembly); }
public IUnaryExpressionBuilder CreateUnary(IOperatorBuilder @operator, IFragmentBuilder expression) { return(this.Fragment <IUnaryExpressionBuilder>().With(builder => { builder.Operator = @operator; builder.Expression = expression; })); }
public IBinaryExpressionBuilder CreateBinary(IFragmentBuilder left, IOperatorBuilder @operator, IFragmentBuilder right) { return(this.Fragment <IBinaryExpressionBuilder>().With(builder => { builder.Left = left; builder.Operator = @operator; builder.Right = right; })); }
protected virtual void VisitOperator(IOperatorBuilder expression) { var handler = default(SqlQueryWriterVisitorHandler); if (!Operators.TryGetValue(expression.Operator, out handler)) { throw new NotImplementedException(); } handler(this, expression); }
public Calculator(IСalculateHelper сalculateHelper, IOperatorBuilder operatorBuilder) { _сalculateHelper = сalculateHelper; _operatorBuilder = operatorBuilder; }