17 instantiations of CodeCastExpression
Microsoft.Build.Tasks.Core (1)
system.design\stronglytypedresourcebuilder.cs (1)
656ret = new CodeMethodReturnStatement(new CodeCastExpression(valueType, new CodeVariableReferenceExpression("obj")));
PresentationBuildTasks (4)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (4)
1009CodeCastExpression cceTarget = new CodeCastExpression(KnownTypes.Types[(int)KnownElements.Style], careTarget); 1063cceTarget = new CodeCastExpression( eventTarget, careTarget); 1192CodeCastExpression cceTarget = new CodeCastExpression(cc.ElementTypeReference, careTarget); 2930CodeCastExpression cceCD = new CodeCastExpression(typeof(Delegate), cmieCD);
System.Windows.Forms.Design (12)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (2)
1986exp = new CodeCastExpression(parameters[i].ParameterType, exp); 2043expression = new CodeCastExpression(targetType, expression);
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (3)
444expression = new CodeCastExpression(elementType, expression); 536serializedObject = new CodeCastExpression(elementType, serializedObject!); 615expression = new CodeCastExpression(elementType, expression);
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (2)
511CodeCastExpression castExp = new(type, valueExpression); 530CodeCastExpression castExp = new(type, valueExpression);
System\ComponentModel\Design\Serialization\EnumCodeDomSerializer.cs (1)
82expression = new CodeCastExpression(enumValue.GetType(), expression);
System\ComponentModel\Design\Serialization\PrimitiveCodeDomSerializer.cs (1)
29_ => new CodeCastExpression(new CodeTypeReference(value.GetType()), new CodePrimitiveExpression(value)),
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.cs (1)
353return new CodeCastExpression(castTo, methodInvoke);
System\Resources\Tools\StronglyTypedResourceBuilder.cs (1)
802returnStatement = new(new CodeCastExpression(valueType, new CodeVariableReferenceExpression("obj")));
System\Windows\Forms\Design\TableLayoutControlCollectionCodeDomSerializer.cs (1)
68serializedObj = new CodeCastExpression(typeof(Control), serializedObj);
22 references to CodeCastExpression
PresentationBuildTasks (4)
MS\Internal\MarkupCompiler\MarkupCompiler.cs (4)
1009CodeCastExpression cceTarget = new CodeCastExpression(KnownTypes.Types[(int)KnownElements.Style], careTarget); 1044CodeCastExpression cceTarget; 1192CodeCastExpression cceTarget = new CodeCastExpression(cc.ElementTypeReference, careTarget); 2930CodeCastExpression cceCD = new CodeCastExpression(typeof(Delegate), cmieCD);
System (1)
src\libraries\shims\System\ref\System.cs (1)
39[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.CodeDom.CodeCastExpression))]
System.CodeDom (10)
Microsoft\CSharp\CSharpCodeGenerator.cs (3)
291private void GenerateCastExpression(CodeCastExpression e) 1146else if (e is CodeCastExpression) 1148GenerateCastExpression((CodeCastExpression)e);
Microsoft\VisualBasic\VBCodeGenerator.cs (1)
936protected override void GenerateCastExpression(CodeCastExpression e)
System\CodeDom\Compiler\CodeGenerator.cs (3)
523else if (e is CodeCastExpression) 525GenerateCastExpression((CodeCastExpression)e); 1372protected abstract void GenerateCastExpression(CodeCastExpression e);
System\CodeDom\Compiler\CodeValidator.cs (3)
683else if (e is CodeCastExpression) 685ValidateCastExpression((CodeCastExpression)e); 807private void ValidateCastExpression(CodeCastExpression e)
System.Windows.Forms.Design (5)
System\ComponentModel\Design\Serialization\CodeDomSerializerBase.cs (3)
882if (methodInvokeEx.Method.TargetObject is CodeCastExpression castExpr) 929else if (result is CodeCastExpression castEx) 2647if (expression is CodeCastExpression castEx)
System\ComponentModel\Design\Serialization\ComponentCodeDomSerializer.cs (2)
511CodeCastExpression castExp = new(type, valueExpression); 530CodeCastExpression castExp = new(type, valueExpression);
System.Windows.Forms.Design.Tests (2)
Serialization\PrimitiveCodeDomSerializerTests.cs (2)
45var cast = underTest.Serialize(manager, (byte)42) as CodeCastExpression;