当前位置: 首页>>代码示例>>C#>>正文


C# Notation类代码示例

本文整理汇总了C#中Notation的典型用法代码示例。如果您正苦于以下问题:C# Notation类的具体用法?C# Notation怎么用?C# Notation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Notation类属于命名空间,在下文中一共展示了Notation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Consolery

        public Consolery(Type targetType, object target, string[] args, IMessenger messenger, Notation notationType)
        {
            Contract.Requires(targetType != null);
            Contract.Requires(args != null);
            Contract.Requires(messenger != null);

            _target = target;
            _targetType = targetType;
            _args = args;
            _messenger = messenger;

            _actionMethods = _targetType
                .GetMethods(BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance)
                .Where(method => method.GetCustomAttributes(false).OfType<ActionAttribute>().Any())
                .ToList();

            _metadata = new Metadata(_actionMethods);
            _metadataValidator = new MetadataValidator(_targetType, _actionMethods, _metadata);
            if (notationType == Notation.Windows)
            {
                _notation = new WindowsNotationStrategy(_args, _messenger, _metadata, _targetType, _actionMethods);
            }
            else
            {
                _notation = new LinuxNotationStrategy(_args, _messenger, _metadata);
            }
        }
开发者ID:nuxleus,项目名称:nconsoler,代码行数:27,代码来源:Consolery.cs

示例2: SqlWriter

 public SqlWriter(Notation notation)
 {
     ProviderHelper = new DataProviderHelper();
     this.notation = notation;
     sb = new StringBuilder();
     newLineFlag = false;
 }
开发者ID:,项目名称:,代码行数:7,代码来源:

示例3: MainWindow

 /// <summary>
 /// Default Application Constructor
 /// </summary>
 public MainWindow()
 {
     InitializeComponent();
     GridStack = new Stack<Grid>();
     TokenStack = new Stack<String>();
     Token_Counter = 0;
     OperatorPopCounter = 0;
     AnimationSpeed = 1;
     CurrentlyAnimating = false;
     notation = Notation.Postfix;
     StackSize = (int)StackCanvas.Height/RECTANGLE_HEIGHT;
 }
开发者ID:rishidewan33,项目名称:Prefix-Postfix-Stack-Animation,代码行数:15,代码来源:MainWindow.xaml.cs

示例4: Run

 /// <summary>
 /// Runs an appropriate Action method
 /// </summary>
 /// <param name="targetType">Type where to search for Action methods</param>
 /// <param name="args">Arguments that will be converted to Action method arguments</param>
 /// <param name="messenger">Uses for writing messages instead of Console class methods</param>
 /// <param name="notationType">Switch for command line syntax. Windows: /param:value Linux: -param value</param>
 public static void Run(Type targetType, string[] args, IMessenger messenger, Notation notationType = Notation.Windows)
 {
     try
     {
         new Consolery(targetType, null, args, messenger, notationType).RunAction();
     }
     catch (NConsolerException e)
     {
         messenger.Write(e.Message);
         const int genericErrorExitCode = 1;
         Environment.ExitCode = genericErrorExitCode;
     }
 }
开发者ID:lukesmith,项目名称:SpecFlow,代码行数:20,代码来源:NConsoler.cs

示例5: ProcessQueryExp

 private void ProcessQueryExp(Notation notation, Symbol qexpr, QueryContext context)        
 {
     Notation.Record[] recs = notation.Select(qexpr,
         new Descriptor[] { Descriptor.Union, Descriptor.Except }, 2);
     if (recs.Length > 0)
     {
         ProcessQueryExp(notation, recs[0].Arg0, context);
         ProcessQueryTerm(notation, recs[0].Arg1, context);
     }
     else
         ProcessQueryTerm(notation, qexpr, context);
     ConfirmBindings(notation, qexpr, context);
 }
开发者ID:,项目名称:,代码行数:13,代码来源:

示例6: command_BeforeExecute

 private void command_BeforeExecute(Command source, Notation notation, Optimizer optimizer, QueryContext context)
 {
     this.context = context;
     Notation.Record[] recs = notation.Select(Descriptor.Root, 1);
     if (recs.Length > 0)
     {
         Notation.Record[] recsd = notation.Select(recs[0].Arg0, Descriptor.Binding, 1);
         if (recsd.Length > 0)
             throw new ESQLException("Query parameters is not supported in XQueryConsole", null);
     }
     if (context.UseSampleData)
     {
         String path = Path.Combine(
             Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Data");
         if (Directory.Exists(path))
             context.DatabaseDictionary.SearchPath = path;                
     }
 }
开发者ID:,项目名称:,代码行数:18,代码来源:

示例7: WriteTypeswitch

 public virtual void WriteTypeswitch(Notation.Record rec)
 {
     WriteText("typeswitch (");
     WriteExpr(rec.args[0]);
     WriteText(")");
     Symbol[] arr = Lisp.ToArray<Symbol>(rec.args[1]);
     for (int k = 0; k < arr.Length; k++)
     {
         Notation.Record[] recs = notation.Select(arr[k], new Descriptor[] { Descriptor.Case });
         if (recs.Length > 0)
         {
             WriteText(" case ");
             if (recs[0].args.Length > 2)
             {
                 WriteText('$');
                 WriteVarName((VarName)recs[0].Arg0);
                 WriteText(" as ");
                 WriteSequenceType(recs[0].Arg1);
                 WriteText(" return ");
                 WriteExprSingle(recs[0].Arg2);
             }
             else
             {
                 WriteSequenceType(recs[0].Arg0);
                 WriteText(" return ");
                 WriteExprSingle(recs[0].Arg1);
             }
         }
     }
     if (rec.args.Length > 3)
     {
         WriteText(" default $");
         WriteVarName((VarName)rec.Arg2);
         WriteText(" return ");
         WriteExprSingle(rec.Arg3);
     }
     else
     {
         WriteText(" default return ");
         WriteExprSingle(rec.Arg2);
     }
 }
开发者ID:,项目名称:,代码行数:42,代码来源:

示例8: WriteLetOperator

 public virtual void WriteLetOperator(Notation.Record rec)
 {
     WriteText("let ");
     Symbol[] arr = Lisp.ToArray<Symbol>(rec.args[0]);
     for (int k = 0; k < arr.Length; k++)
     {
         Notation.Record[] recs = notation.Select(arr[k], Descriptor.LetClauseOperator, 3);
         if (recs.Length > 0)
         {
             if (k > 0)
                 WriteText(", ");
             WriteText('$');
             WriteVarName((VarName)recs[0].Arg0);
             if (recs[0].Arg1 != null)
             {
                 WriteText(' ');
                 WriteTypeDecl(recs[0].Arg1);
             }
             WriteText(" := ");
             WriteExprSingle(recs[0].Arg2);
         }
     }
 }
开发者ID:,项目名称:,代码行数:23,代码来源:

示例9: WriteOptionDecl

 public virtual void WriteOptionDecl(Notation.Record rec)
 {
     WriteText("declare option ");
     WriteQName((Qname)rec.Arg0);
     WriteText(' ');
     WriteLiteral((Literal)rec.Arg1);
 }
开发者ID:,项目名称:,代码行数:7,代码来源:

示例10: WriteFuncDecl

 public virtual void WriteFuncDecl(Notation.Record rec)
 {
     WriteText("declare function ");
     WriteQName((Qname)rec.Arg0);
     WriteText('(');
     WriteParamList(rec.args[1]);
     WriteText(')');
     if (rec.args.Length > 3)
     {
         WriteText(" as ");
         WriteSequenceType(rec.Arg2);
         if (rec.args[3] == null)
             WriteText(" external");
         else
         {
             SmartNewLine();
             WriteText('{');
             SmartNewLine();
             WriteExpr(rec.args[3]);
             SmartNewLine();
             WriteText('}');
         }
     }
     else
     {
         if (rec.args[2] == null)
             WriteText(" external");
         else
         {
             SmartNewLine();
             WriteText('{');
             SmartNewLine();
             WriteExpr(rec.args[2]);
             SmartNewLine();
             WriteText('}');
         }
     }
 }
开发者ID:,项目名称:,代码行数:38,代码来源:

示例11: WriteBaseUri

 public virtual void WriteBaseUri(Notation.Record rec)
 {
     WriteText("declare base-uri ");
     WriteLiteral((Literal)rec.Arg0);
 }
开发者ID:,项目名称:,代码行数:5,代码来源:

示例12: WriteDefaultCollaction

 public virtual void WriteDefaultCollaction(Notation.Record rec)
 {
     WriteText("declare default collation ");
     WriteLiteral((Literal)rec.Arg0);
 }
开发者ID:,项目名称:,代码行数:5,代码来源:

示例13: WriteSchemaAttributeTest

 public virtual void WriteSchemaAttributeTest(Notation.Record rec)
 {
     WriteText("schema-attribute(");
     WriteQName((Qname)rec.Arg0);
     WriteText(")");
 }
开发者ID:,项目名称:,代码行数:6,代码来源:

示例14: WriteSchemaElementTest

 public virtual void WriteSchemaElementTest(Notation.Record rec)
 {
     WriteText("schema-element(");
     WriteQName((Qname)rec.Arg0);
     WriteText(")");
 }
开发者ID:,项目名称:,代码行数:6,代码来源:

示例15: WriteAttributeTest

 public virtual void WriteAttributeTest(Notation.Record rec)
 {
     WriteText("attribute(");
     if (rec.Arg0.Tag == Tag.TokenWrapper)
     {
         if (((TokenWrapper)rec.Arg0).Data == '*')
             WriteText('*');
     }
     else
         WriteQName((Qname)rec.Arg0);
     if (rec.args.Length > 1)
     {
         WriteText(", ");
         WriteTypeName(rec.Arg1);
     }
     WriteText(")");
 }
开发者ID:,项目名称:,代码行数:17,代码来源:


注:本文中的Notation类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。