• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# CSharpBinderFlags类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: PSInvokeMemberBinder

		public PSInvokeMemberBinder (CSharpBinderFlags flags, string name, Type callingContext, IEnumerable<Type> typeArguments, IEnumerable<CSharpArgumentInfo> argumentInfo)
		{
			this.name = name;

			var argList = argumentInfo as System.Collections.IList;
			if (argList != null)
			{
				// allocate argument list
				this.mArgs = new object[argList.Count - 1];
			}

//			this.flags = flags;
//			this.callingContext = callingContext;
//			this.argumentInfo = new List<CSharpArgumentInfo>(argumentInfo);
//			if (typeArguments != null) this.typeArguments = new List<Type>(typeArguments);
		}
开发者ID:johnv315,项目名称:playscript-mono,代码行数:16,代码来源:PSInvokeMemberBinder.cs


示例17: BinaryOperation

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

        /// <summary>
        /// Initializes a new CSharp binary operation binder.
        /// </summary>
        /// <param name="flags">The flags with which to initialize the binder.</param>
        /// <param name="operation">The binary operation kind.</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 binary operation binder.</returns>
        public static CallSiteBinder BinaryOperation(
            CSharpBinderFlags flags,
            ExpressionType operation,
            Type context,
            IEnumerable<CSharpArgumentInfo> argumentInfo)
        {
            bool isChecked = (flags & CSharpBinderFlags.CheckedContext) != 0;
            bool isLogical = (flags & CSharpBinderFlags.BinaryOperationLogical) != 0;

            CSharpBinaryOperationFlags binaryOperationFlags = 0;
            if (isLogical)
            {
                binaryOperationFlags |= CSharpBinaryOperationFlags.LogicalOperation;
            }

            return new CSharpBinaryOperationBinder(operation, isChecked, binaryOperationFlags, context, argumentInfo);
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:27,代码来源:Binder.cs


示例18: ReduceDynamicAssignment

        public static Expression ReduceDynamicAssignment(DynamicCSharpArgument left, Func<Expression, Expression> functionalOp, CSharpBinderFlags flags, bool prefix = true)
        {
            var lhs = MakeWriteable(left.Expression);

            var dynamicMember = lhs as GetMemberDynamicCSharpExpression;
            if (dynamicMember != null)
            {
                return ReduceDynamicMember(dynamicMember, functionalOp, flags, prefix);
            }

            var dynamicIndex = lhs as GetIndexDynamicCSharpExpression;
            if (dynamicIndex != null)
            {
                return ReduceDynamicIndex(dynamicIndex, functionalOp, flags, prefix);
            }

            return Helpers.ReduceAssignment(lhs, functionalOp, prefix);
        }
开发者ID:taolin123,项目名称:ExpressionFutures,代码行数:18,代码来源:DynamicHelpers.cs


示例19: UnaryOperation

		public static CallSiteBinder UnaryOperation (CSharpBinderFlags flags, ExpressionType operation, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
		{
			return new CSharpUnaryOperationBinder (operation, flags, context, argumentInfo);
		}
开发者ID:MichaelWalsh,项目名称:mono,代码行数:4,代码来源:Binder.cs


示例20: SetMember

		public static CallSiteBinder SetMember (CSharpBinderFlags flags, string name, Type context, IEnumerable<CSharpArgumentInfo> argumentInfo)
		{
			return new CSharpSetMemberBinder (name, context, argumentInfo);
		}
开发者ID:MichaelWalsh,项目名称:mono,代码行数:4,代码来源:Binder.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CSharpCompilation类代码示例发布时间:2022-05-24
下一篇:
C# CSSNode类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap