Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
 public IUnaryExpressionBuilder CreateUnary(IOperatorBuilder @operator, IFragmentBuilder expression)
 {
     return(this.Fragment <IUnaryExpressionBuilder>().With(builder =>
     {
         builder.Operator = @operator;
         builder.Expression = expression;
     }));
 }
Ejemplo n.º 3
0
 public IBinaryExpressionBuilder CreateBinary(IFragmentBuilder left, IOperatorBuilder @operator, IFragmentBuilder right)
 {
     return(this.Fragment <IBinaryExpressionBuilder>().With(builder =>
     {
         builder.Left = left;
         builder.Operator = @operator;
         builder.Right = right;
     }));
 }
Ejemplo n.º 4
0
        protected virtual void VisitOperator(IOperatorBuilder expression)
        {
            var handler = default(SqlQueryWriterVisitorHandler);

            if (!Operators.TryGetValue(expression.Operator, out handler))
            {
                throw new NotImplementedException();
            }
            handler(this, expression);
        }
Ejemplo n.º 5
0
 public Calculator(IСalculateHelper сalculateHelper, IOperatorBuilder operatorBuilder)
 {
     _сalculateHelper = сalculateHelper;
     _operatorBuilder = operatorBuilder;
 }