當前位置: 首頁>>代碼示例>>C#>>正文


C# AssignmentOperatorType類代碼示例

本文整理匯總了C#中AssignmentOperatorType的典型用法代碼示例。如果您正苦於以下問題:C# AssignmentOperatorType類的具體用法?C# AssignmentOperatorType怎麽用?C# AssignmentOperatorType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AssignmentOperatorType類屬於命名空間,在下文中一共展示了AssignmentOperatorType類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: TestAssignmentExpression

        void TestAssignmentExpression(string program, AssignmentOperatorType op)
        {
            ExpressionStatement se = ParseUtil.ParseStatement<ExpressionStatement>(program);
            AssignmentExpression ae = se.Expression as AssignmentExpression;
            Assert.AreEqual(op, ae.Op);

            Assert.IsTrue(ae.Left is IdentifierExpression);
            Assert.IsTrue(ae.Right is IdentifierExpression);
        }
開發者ID:richardschneider,項目名稱:ILSpy,代碼行數:9,代碼來源:AssignmentExpressionTests.cs

示例2: TestAssignmentExpression

		void TestAssignmentExpression(string program, AssignmentOperatorType op)
		{
			AssignmentExpression ae = ParseUtilCSharp.ParseExpression<AssignmentExpression>(program);
			
			Assert.AreEqual(op, ae.Operator);
			
			Assert.IsTrue(ae.Left is IdentifierExpression);
			Assert.IsTrue(ae.Right is IdentifierExpression);
		}
開發者ID:0xb1dd1e,項目名稱:NRefactory,代碼行數:9,代碼來源:AssignmentExpressionTests.cs

示例3: assign_To

 public static AssignmentExpression assign_To(this Expression left, AssignmentOperatorType assignmentOperator, Expression right)
 {
     return new AssignmentExpression(left, assignmentOperator, right);
 }
開發者ID:SergeTruth,項目名稱:OxyChart,代碼行數:4,代碼來源:AssignmentExpression_ExtensionMethods.cs

示例4: AssignmentExpression

		public AssignmentExpression(Expression left, AssignmentOperatorType op, Expression right) {
			Left = left;
			Op = op;
			Right = right;
		}
開發者ID:Altaxo,項目名稱:Altaxo,代碼行數:5,代碼來源:Generated.cs

示例5: AssignmentOperator

	void AssignmentOperator(
#line  1655 "VBNET.ATG" 
out AssignmentOperatorType op) {

#line  1656 "VBNET.ATG" 
		op = AssignmentOperatorType.None; 
		switch (la.kind) {
		case 20: {
			lexer.NextToken();

#line  1657 "VBNET.ATG" 
			op = AssignmentOperatorType.Assign; 
			break;
		}
		case 54: {
			lexer.NextToken();

#line  1658 "VBNET.ATG" 
			op = AssignmentOperatorType.ConcatString; 
			break;
		}
		case 46: {
			lexer.NextToken();

#line  1659 "VBNET.ATG" 
			op = AssignmentOperatorType.Add; 
			break;
		}
		case 48: {
			lexer.NextToken();

#line  1660 "VBNET.ATG" 
			op = AssignmentOperatorType.Subtract; 
			break;
		}
		case 49: {
			lexer.NextToken();

#line  1661 "VBNET.ATG" 
			op = AssignmentOperatorType.Multiply; 
			break;
		}
		case 50: {
			lexer.NextToken();

#line  1662 "VBNET.ATG" 
			op = AssignmentOperatorType.Divide; 
			break;
		}
		case 51: {
			lexer.NextToken();

#line  1663 "VBNET.ATG" 
			op = AssignmentOperatorType.DivideInteger; 
			break;
		}
		case 47: {
			lexer.NextToken();

#line  1664 "VBNET.ATG" 
			op = AssignmentOperatorType.Power; 
			break;
		}
		case 52: {
			lexer.NextToken();

#line  1665 "VBNET.ATG" 
			op = AssignmentOperatorType.ShiftLeft; 
			break;
		}
		case 53: {
			lexer.NextToken();

#line  1666 "VBNET.ATG" 
			op = AssignmentOperatorType.ShiftRight; 
			break;
		}
		default: SynErr(277); break;
		}
	}
開發者ID:Bombadil77,項目名稱:SharpDevelop,代碼行數:80,代碼來源:Parser.cs

示例6: AssignmentOperator

	void AssignmentOperator(
#line  1615 "VBNET.ATG" 
out AssignmentOperatorType op) {

#line  1616 "VBNET.ATG" 
		op = AssignmentOperatorType.None; 
		switch (la.kind) {
		case 10: {
			lexer.NextToken();

#line  1617 "VBNET.ATG" 
			op = AssignmentOperatorType.Assign; 
			break;
		}
		case 42: {
			lexer.NextToken();

#line  1618 "VBNET.ATG" 
			op = AssignmentOperatorType.ConcatString; 
			break;
		}
		case 34: {
			lexer.NextToken();

#line  1619 "VBNET.ATG" 
			op = AssignmentOperatorType.Add; 
			break;
		}
		case 36: {
			lexer.NextToken();

#line  1620 "VBNET.ATG" 
			op = AssignmentOperatorType.Subtract; 
			break;
		}
		case 37: {
			lexer.NextToken();

#line  1621 "VBNET.ATG" 
			op = AssignmentOperatorType.Multiply; 
			break;
		}
		case 38: {
			lexer.NextToken();

#line  1622 "VBNET.ATG" 
			op = AssignmentOperatorType.Divide; 
			break;
		}
		case 39: {
			lexer.NextToken();

#line  1623 "VBNET.ATG" 
			op = AssignmentOperatorType.DivideInteger; 
			break;
		}
		case 35: {
			lexer.NextToken();

#line  1624 "VBNET.ATG" 
			op = AssignmentOperatorType.Power; 
			break;
		}
		case 40: {
			lexer.NextToken();

#line  1625 "VBNET.ATG" 
			op = AssignmentOperatorType.ShiftLeft; 
			break;
		}
		case 41: {
			lexer.NextToken();

#line  1626 "VBNET.ATG" 
			op = AssignmentOperatorType.ShiftRight; 
			break;
		}
		default: SynErr(256); break;
		}
	}
開發者ID:Adam-Fogle,項目名稱:agentralphplugin,代碼行數:80,代碼來源:Parser.cs

示例7: AssignmentOperator

	void AssignmentOperator(
#line  1430 "cs.ATG" 
out AssignmentOperatorType op) {

#line  1431 "cs.ATG" 
		op = AssignmentOperatorType.None; 
		if (la.kind == 3) {
			lexer.NextToken();

#line  1433 "cs.ATG" 
			op = AssignmentOperatorType.Assign; 
		} else if (la.kind == 38) {
			lexer.NextToken();

#line  1434 "cs.ATG" 
			op = AssignmentOperatorType.Add; 
		} else if (la.kind == 39) {
			lexer.NextToken();

#line  1435 "cs.ATG" 
			op = AssignmentOperatorType.Subtract; 
		} else if (la.kind == 40) {
			lexer.NextToken();

#line  1436 "cs.ATG" 
			op = AssignmentOperatorType.Multiply; 
		} else if (la.kind == 41) {
			lexer.NextToken();

#line  1437 "cs.ATG" 
			op = AssignmentOperatorType.Divide; 
		} else if (la.kind == 42) {
			lexer.NextToken();

#line  1438 "cs.ATG" 
			op = AssignmentOperatorType.Modulus; 
		} else if (la.kind == 43) {
			lexer.NextToken();

#line  1439 "cs.ATG" 
			op = AssignmentOperatorType.BitwiseAnd; 
		} else if (la.kind == 44) {
			lexer.NextToken();

#line  1440 "cs.ATG" 
			op = AssignmentOperatorType.BitwiseOr; 
		} else if (la.kind == 45) {
			lexer.NextToken();

#line  1441 "cs.ATG" 
			op = AssignmentOperatorType.ExclusiveOr; 
		} else if (la.kind == 46) {
			lexer.NextToken();

#line  1442 "cs.ATG" 
			op = AssignmentOperatorType.ShiftLeft; 
		} else if (
#line  1443 "cs.ATG" 
la.kind == Tokens.GreaterThan && Peek(1).kind == Tokens.GreaterEqual) {
			Expect(22);
			Expect(35);

#line  1444 "cs.ATG" 
			op = AssignmentOperatorType.ShiftRight; 
		} else SynErr(195);
	}
開發者ID:pluraldj,項目名稱:SharpDevelop,代碼行數:66,代碼來源:Parser.cs

示例8: TypeOfAssignment

        public static BinaryOperatorType TypeOfAssignment(AssignmentOperatorType operatorType)
        {
            switch (operatorType)
            {
                case AssignmentOperatorType.Assign:
                    return BinaryOperatorType.Any;

                case AssignmentOperatorType.Add:
                    return BinaryOperatorType.Add;

                case AssignmentOperatorType.Subtract:
                    return BinaryOperatorType.Subtract;

                case AssignmentOperatorType.Multiply:
                    return BinaryOperatorType.Multiply;

                case AssignmentOperatorType.Divide:
                    return BinaryOperatorType.Divide;

                case AssignmentOperatorType.Modulus:
                    return BinaryOperatorType.Modulus;

                case AssignmentOperatorType.ShiftLeft:
                    return BinaryOperatorType.ShiftLeft;

                case AssignmentOperatorType.ShiftRight:
                    return BinaryOperatorType.ShiftRight;

                case AssignmentOperatorType.BitwiseAnd:
                    return BinaryOperatorType.BitwiseAnd;

                case AssignmentOperatorType.BitwiseOr:
                    return BinaryOperatorType.BitwiseOr;

                case AssignmentOperatorType.ExclusiveOr:
                    return BinaryOperatorType.ExclusiveOr;

                case AssignmentOperatorType.Any:
                    return BinaryOperatorType.Any;

                default:
                    throw new ArgumentOutOfRangeException("operatorType", operatorType, null);
            }
        }
開發者ID:yindongfei,項目名稱:bridge.lua,代碼行數:44,代碼來源:Helpers.cs

示例9: ConvertAssignment

        static IfElseStatement ConvertAssignment(Expression target, AssignmentOperatorType op,
												  ConditionalExpression conditionalExpr)
        {
            var trueAssignment = new AssignmentExpression (target.Clone (), op,
                                                           conditionalExpr.TrueExpression.Clone ());
            var falseAssignment = new AssignmentExpression (target.Clone (), op,
                                                            conditionalExpr.FalseExpression.Clone ());
            return new IfElseStatement (conditionalExpr.Condition.Clone (),
                                        new ExpressionStatement (trueAssignment),
                                        new ExpressionStatement (falseAssignment));
        }
開發者ID:porcus,項目名稱:NRefactory,代碼行數:11,代碼來源:ConvertConditionalToIfAction.cs

示例10: AssignmentOperator

	void AssignmentOperator(out AssignmentOperatorType op) {
		op = AssignmentOperatorType.None;
		switch (la.kind) {
		case 20: {
			Get();
			op = AssignmentOperatorType.Assign;
			break;
		}
		case 54: {
			Get();
			op = AssignmentOperatorType.ConcatString;
			break;
		}
		case 46: {
			Get();
			op = AssignmentOperatorType.Add;
			break;
		}
		case 48: {
			Get();
			op = AssignmentOperatorType.Subtract;
			break;
		}
		case 49: {
			Get();
			op = AssignmentOperatorType.Multiply;
			break;
		}
		case 50: {
			Get();
			op = AssignmentOperatorType.Divide;
			break;
		}
		case 51: {
			Get();
			op = AssignmentOperatorType.DivideInteger;
			break;
		}
		case 47: {
			Get();
			op = AssignmentOperatorType.Power;
			break;
		}
		case 52: {
			Get();
			op = AssignmentOperatorType.ShiftLeft;
			break;
		}
		case 53: {
			Get();
			op = AssignmentOperatorType.ShiftRight;
			break;
		}
		default: SynErr(279); break;
		}
	}
開發者ID:ThomasZitzler,項目名稱:ILSpy,代碼行數:56,代碼來源:Parser.cs

示例11: AssignmentExpression

 public AssignmentExpression(Expression left, AssignmentOperatorType op, Expression right)
 {
     this.left  = left;
     this.op    = op;
     this.right = right;
 }
開發者ID:slluis,項目名稱:monodevelop-prehistoric,代碼行數:6,代碼來源:AssignmentExpression.cs

示例12: AssignmentOperator

 private void AssignmentOperator(out AssignmentOperatorType op)
 {
     op = AssignmentOperatorType.None;
     if (this.la.kind == 3)
     {
         base.lexer.NextToken();
         op = AssignmentOperatorType.Assign;
     }
     else if (this.la.kind == 0x26)
     {
         base.lexer.NextToken();
         op = AssignmentOperatorType.Add;
     }
     else if (this.la.kind == 0x27)
     {
         base.lexer.NextToken();
         op = AssignmentOperatorType.Subtract;
     }
     else if (this.la.kind == 40)
     {
         base.lexer.NextToken();
         op = AssignmentOperatorType.Multiply;
     }
     else if (this.la.kind == 0x29)
     {
         base.lexer.NextToken();
         op = AssignmentOperatorType.Divide;
     }
     else if (this.la.kind == 0x2a)
     {
         base.lexer.NextToken();
         op = AssignmentOperatorType.Modulus;
     }
     else if (this.la.kind == 0x2b)
     {
         base.lexer.NextToken();
         op = AssignmentOperatorType.BitwiseAnd;
     }
     else if (this.la.kind == 0x2c)
     {
         base.lexer.NextToken();
         op = AssignmentOperatorType.BitwiseOr;
     }
     else if (this.la.kind == 0x2d)
     {
         base.lexer.NextToken();
         op = AssignmentOperatorType.ExclusiveOr;
     }
     else if (this.la.kind == 0x2e)
     {
         base.lexer.NextToken();
         op = AssignmentOperatorType.ShiftLeft;
     }
     else if ((this.la.kind == 0x16) && (this.Peek(1).kind == 0x23))
     {
         base.Expect(0x16);
         base.Expect(0x23);
         op = AssignmentOperatorType.ShiftRight;
     }
     else
     {
         base.SynErr(0xa9);
     }
 }
開發者ID:KnowNo,項目名稱:test-code-backup,代碼行數:64,代碼來源:Parser.cs

示例13: ConvertOperator

		B.BinaryOperatorType ConvertOperator(AssignmentOperatorType op, out bool isInPlace)
		{
			isInPlace = true;
			switch (op) {
				case AssignmentOperatorType.Add:
					return B.BinaryOperatorType.InPlaceAddition;
				case AssignmentOperatorType.Assign:
					return B.BinaryOperatorType.Assign;
				case AssignmentOperatorType.BitwiseAnd:
					return B.BinaryOperatorType.InPlaceBitwiseAnd;
				case AssignmentOperatorType.BitwiseOr:
					return B.BinaryOperatorType.InPlaceBitwiseOr;
				case AssignmentOperatorType.ConcatString:
					return B.BinaryOperatorType.InPlaceAddition;
				case AssignmentOperatorType.Divide:
					return B.BinaryOperatorType.InPlaceDivision;
				case AssignmentOperatorType.DivideInteger:
					return B.BinaryOperatorType.InPlaceDivision;
				case AssignmentOperatorType.ExclusiveOr:
					return B.BinaryOperatorType.InPlaceExclusiveOr;
				case AssignmentOperatorType.Modulus:
					isInPlace = false;
					return B.BinaryOperatorType.Modulus;
				case AssignmentOperatorType.Multiply:
					return B.BinaryOperatorType.InPlaceMultiply;
				case AssignmentOperatorType.Power:
					isInPlace = false;
					return B.BinaryOperatorType.Exponentiation;
				case AssignmentOperatorType.ShiftLeft:
					return B.BinaryOperatorType.InPlaceShiftLeft;
				case AssignmentOperatorType.ShiftRight:
					return B.BinaryOperatorType.InPlaceShiftRight;
				case AssignmentOperatorType.Subtract:
					return B.BinaryOperatorType.InPlaceSubtraction;
				default:
					return B.BinaryOperatorType.None;
			}
		}
開發者ID:kingjiang,項目名稱:SharpDevelopLite,代碼行數:38,代碼來源:ConvertVisitorExpressions.cs

示例14: AssignmentOperator

	void AssignmentOperator(
#line  1478 "VBNET.ATG" 
out AssignmentOperatorType op) {

#line  1479 "VBNET.ATG" 
		op = AssignmentOperatorType.None; 
		switch (la.kind) {
		case 11: {
			lexer.NextToken();

#line  1480 "VBNET.ATG" 
			op = AssignmentOperatorType.Assign; 
			break;
		}
		case 42: {
			lexer.NextToken();

#line  1481 "VBNET.ATG" 
			op = AssignmentOperatorType.ConcatString; 
			break;
		}
		case 34: {
			lexer.NextToken();

#line  1482 "VBNET.ATG" 
			op = AssignmentOperatorType.Add; 
			break;
		}
		case 36: {
			lexer.NextToken();

#line  1483 "VBNET.ATG" 
			op = AssignmentOperatorType.Subtract; 
			break;
		}
		case 37: {
			lexer.NextToken();

#line  1484 "VBNET.ATG" 
			op = AssignmentOperatorType.Multiply; 
			break;
		}
		case 38: {
			lexer.NextToken();

#line  1485 "VBNET.ATG" 
			op = AssignmentOperatorType.Divide; 
			break;
		}
		case 39: {
			lexer.NextToken();

#line  1486 "VBNET.ATG" 
			op = AssignmentOperatorType.DivideInteger; 
			break;
		}
		case 35: {
			lexer.NextToken();

#line  1487 "VBNET.ATG" 
			op = AssignmentOperatorType.Power; 
			break;
		}
		case 40: {
			lexer.NextToken();

#line  1488 "VBNET.ATG" 
			op = AssignmentOperatorType.ShiftLeft; 
			break;
		}
		case 41: {
			lexer.NextToken();

#line  1489 "VBNET.ATG" 
			op = AssignmentOperatorType.ShiftRight; 
			break;
		}
		default: SynErr(216); break;
		}
	}
開發者ID:slluis,項目名稱:monodevelop-prehistoric,代碼行數:80,代碼來源:Parser.cs

示例15: IsBitwiseOperator

			static bool IsBitwiseOperator (AssignmentOperatorType op)
			{
				return op == AssignmentOperatorType.BitwiseAnd || op == AssignmentOperatorType.BitwiseOr ||
					op == AssignmentOperatorType.ExclusiveOr;
			}
開發者ID:adisik,項目名稱:simple-assembly-explorer,代碼行數:5,代碼來源:BitwiseOperationOnNonFlagsEnumIssue.cs


注:本文中的AssignmentOperatorType類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。