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


C# CSharpBinderFlags类代码示例

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


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

示例1: AssignBinaryDynamicCSharpExpression

 internal AssignBinaryDynamicCSharpExpression(Type context, CSharpBinderFlags binderFlags, CSharpExpressionType binaryType, DynamicCSharpArgument left, DynamicCSharpArgument right)
     : base(context, binderFlags)
 {
     OperationNodeType = binaryType;
     Left = left;
     Right = right;
 }
开发者ID:taolin123,项目名称:ExpressionFutures,代码行数:7,代码来源:AssignBinaryDynamicCSharpExpression.cs

示例2: GetIndex

        //////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Initializes a new CSharp get index binder.
        /// </summary>
        /// <param name="flags">The flags with which to initialize the binder.</param>
        /// <param name="context">The <see cref="System.Type"/> that indicates where this operation is used.</param>
        /// <param name="argumentInfo">The sequence of <see cref="CSharpArgumentInfo"/> instances for the arguments to this operation.</param>
        /// <returns>Returns a new CSharp get index binder.</returns>
        public static CallSiteBinder GetIndex(
            CSharpBinderFlags flags,
            Type context,
            IEnumerable<CSharpArgumentInfo> argumentInfo)
        {
            return new CSharpGetIndexBinder(context, argumentInfo);
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:16,代码来源:Binder.cs

示例3: CSharpSetMemberBinder

		public CSharpSetMemberBinder (CSharpBinderFlags flags, string name, Type callingContext, IEnumerable<CSharpArgumentInfo> argumentInfo)
			: base (name, false)
		{
			this.flags = flags;
			this.callingContext = callingContext;
			this.argumentInfo = argumentInfo.ToReadOnly ();
		}
开发者ID:jdecuyper,项目名称:mono,代码行数:7,代码来源:CSharpSetMemberBinder.cs

示例4: CSharpInvokeBinder

		public CSharpInvokeBinder (CSharpBinderFlags flags, Type callingContext, IEnumerable<CSharpArgumentInfo> argumentInfo)
			: base (CSharpArgumentInfo.CreateCallInfo (argumentInfo, 1))
		{
			this.flags = flags;
			this.callingContext = callingContext;
			this.argumentInfo = argumentInfo.ToReadOnly ();
		}
开发者ID:robterrell,项目名称:playscript-mono,代码行数:7,代码来源:CSharpInvokeBinder.cs

示例5: InvokeMemberDynamicCSharpExpression

 internal InvokeMemberDynamicCSharpExpression(Type context, CSharpBinderFlags binderFlags, string name, ReadOnlyCollection<Type> typeArguments, ReadOnlyCollection<DynamicCSharpArgument> arguments)
     : base(context, binderFlags)
 {
     Name = name;
     TypeArguments = typeArguments;
     Arguments = arguments;
 }
开发者ID:taolin123,项目名称:ExpressionFutures,代码行数:7,代码来源:InvokeMemberDynamicCSharpExpression.cs

示例6: ReduceDynamicIndex

        private static Expression ReduceDynamicIndex(GetIndexDynamicCSharpExpression index, Func<Expression, Expression> functionalOp, CSharpBinderFlags flags, bool prefix)
        {
            var args = default(DynamicCSharpArgument[]);
            var block = default(Expression[]);
            var temps = default(ParameterExpression[]);
            var i = CopyArguments(index.Object, index.Arguments, prefix, out args, out block, out temps);

            index = index.Update(temps[0], new TrueReadOnlyCollection<DynamicCSharpArgument>(args));

            if (prefix)
            {
                block[i++] = index.ReduceAssignment(functionalOp(index), flags);
            }
            else
            {
                var lastTemp = temps[i] = Expression.Parameter(index.Type, "__index");

                block[i] = Expression.Assign(temps[i], index);
                i++;

                block[i++] = index.ReduceAssignment(functionalOp(lastTemp), flags);
                block[i++] = lastTemp;
            }

            var res = Expression.Block(temps, block);
            return res;
        }
开发者ID:taolin123,项目名称:ExpressionFutures,代码行数:27,代码来源:DynamicHelpers.cs

示例7: GetMemberDynamicCSharpExpression

 internal GetMemberDynamicCSharpExpression(Type context, CSharpBinderFlags binderFlags, Expression @object, string name, ReadOnlyCollection<DynamicCSharpArgument> arguments)
     : base(context, binderFlags)
 {
     Object = @object;
     Name = name;
     Arguments = arguments;
 }
开发者ID:taolin123,项目名称:ExpressionFutures,代码行数:7,代码来源:GetMemberDynamicCSharpExpression.cs

示例8: CSharpInvokeMemberBinder

		public CSharpInvokeMemberBinder (CSharpBinderFlags flags, string name, Type callingContext, IEnumerable<Type> typeArguments, IEnumerable<CSharpArgumentInfo> argumentInfo)
			: base (name, false, CSharpArgumentInfo.CreateCallInfo (argumentInfo, 1))
		{
			this.flags = flags;
			this.callingContext = callingContext;
			this.argumentInfo = argumentInfo.ToReadOnly ();
			this.typeArguments = typeArguments.ToReadOnly ();
		}
开发者ID:afaerber,项目名称:mono,代码行数:8,代码来源:CSharpInvokeMemberBinder.cs

示例9: CSharpUnaryOperationBinder

		public CSharpUnaryOperationBinder (ExpressionType operation, CSharpBinderFlags flags, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
			: base (operation)
		{
			this.argumentInfo = argumentInfo.ToReadOnly ();
			if (this.argumentInfo.Count != 1)
				throw new ArgumentException ("Unary operation requires 1 argument");

			this.flags = flags;
			this.context = context;
		}
开发者ID:afaerber,项目名称:mono,代码行数:10,代码来源:CSharpUnaryOperationBinder.cs

示例10: BinaryOperation

		// or is it part of roslyn not clr?

        public static CallSiteBinder BinaryOperation(CSharpBinderFlags flags, ExpressionType operation, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
        {
            return (CallSiteBinder)(object)new __BinaryOperationBinder
            {
                flags = flags,
                operation = operation,
                context = context,
                argumentInfo = argumentInfo
            };
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:12,代码来源:Binder.cs

示例11: CSharpBinaryOperationBinder

		public CSharpBinaryOperationBinder (ExpressionType operation, CSharpBinderFlags flags, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
			: base (operation)
		{
			this.argumentInfo = new ReadOnlyCollectionBuilder<CSharpArgumentInfo> (argumentInfo);
			if (this.argumentInfo.Count != 2)
				throw new ArgumentException ("Binary operation requires 2 arguments");

			this.flags = flags;
			this.context = context;
		}
开发者ID:rlfqudxo,项目名称:playscript-mono,代码行数:10,代码来源:CSharpBinaryOperationBinder2.cs

示例12: UnaryOperation

 public static CallSiteBinder UnaryOperation(CSharpBinderFlags flags, ExpressionType operation, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
 {
     // X:\jsc.svn\examples\javascript\Test\TestUnaryOperation\TestUnaryOperation\Application.cs
     return  (CallSiteBinder)(object)new __UnaryOperationBinder
     {
         flags = flags, 
         operation = operation, 
         context = context, 
         argumentInfo = argumentInfo
     };
 }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:11,代码来源:Binder.cs

示例13: InvokeMember

        // Z:\jsc.svn\core\ScriptCoreLib\Shared\BCLImplementation\Microsoft\CSharp\RuntimeBinder\Binder.cs

        public static CallSiteBinder InvokeMember(
           CSharpBinderFlags flags,
           string name,
           IEnumerable<Type> typeArguments,
           Type context,
           IEnumerable<CSharpArgumentInfo> argumentInfo
           )
        {
            // https://sites.google.com/a/jsc-solutions.net/work/knowledge-base/15-dualvr/20160103/ndktype

            return null;
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:14,代码来源:Binder.cs

示例14: GetIndex

        // how does this 

        public static CallSiteBinder GetIndex(CSharpBinderFlags flags, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
        {
            // X:\jsc.svn\examples\javascript\test\TestDynamicGetIndex\TestDynamicGetIndex\Application.cs


            return (CallSiteBinder)(object)new __GetIndexBinder
            {

                flags = flags,
                context = context,
                argumentInfo = argumentInfo
            };
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:15,代码来源:Binder.cs

示例15: Convert

        //////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Initializes a new CSharp convert binder.
        /// </summary>
        /// <param name="flags">The flags with which to initialize the binder.</param>
        /// <param name="type">The type to convert to.</param>
        /// <param name="context">The <see cref="System.Type"/> that indicates where this operation is used.</param>
        /// <returns>Returns a new CSharp convert binder.</returns>
        public static CallSiteBinder Convert(
            CSharpBinderFlags flags,
            Type type,
            Type context)
        {
            CSharpConversionKind conversionKind =
                ((flags & CSharpBinderFlags.ConvertExplicit) != 0) ?
                    CSharpConversionKind.ExplicitConversion :
                    ((flags & CSharpBinderFlags.ConvertArrayIndex) != 0) ?
                        CSharpConversionKind.ArrayCreationConversion :
                        CSharpConversionKind.ImplicitConversion;
            bool isChecked = (flags & CSharpBinderFlags.CheckedContext) != 0;

            return new CSharpConvertBinder(type, conversionKind, isChecked, context);
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:24,代码来源:Binder.cs


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