122 instantiations of CodeCastExpression
PresentationBuildTasks (4)
BuildTasks\Ms\Internal\MarkupCompiler\MarkupCompiler.cs (4)
1015
CodeCastExpression cceTarget = new
CodeCastExpression
(KnownTypes.Types[(int)KnownElements.Style], careTarget);
1069
cceTarget = new
CodeCastExpression
( eventTarget, careTarget);
1194
CodeCastExpression cceTarget = new
CodeCastExpression
(cc.ElementTypeReference, careTarget);
2818
CodeCastExpression cceCD = new
CodeCastExpression
(typeof(Delegate), cmieCD);
System.Activities (3)
System\Activities\XamlIntegration\TextExpressionCompiler.cs (3)
499
new
CodeCastExpression
(memberData.Type, new CodeMethodInvokeExpression(
1122
dataContextVariable.InitExpression = new
CodeCastExpression
(descriptor.TypeName, compiledDataContextIndexer);
1682
CodeExpression getValue = new
CodeCastExpression
(
System.Data (2)
fx\src\data\System\Data\CodeGen\datacache.cs (2)
1429
private static CodeExpression Cast(string type , CodeExpression expr) { return new
CodeCastExpression
(type, expr); }
1430
private static CodeExpression Cast(CodeTypeReference type, CodeExpression expr) { return new
CodeCastExpression
(type, expr); }
System.Data.Entity.Design (4)
System\Data\EntityModel\Emitters\NavigationPropertyEmitter.cs (4)
168
valueRef = new
CodeCastExpression
(typeRef, valueRef);
188
new
CodeCastExpression
(TypeReference.IEntityWithRelationshipsTypeBaseClass, ThisRef),
235
new
CodeCastExpression
(TypeReference.IEntityWithRelationshipsTypeBaseClass, ThisRef),
354
new
CodeCastExpression
(TypeReference.IEntityWithRelationshipsTypeBaseClass, ThisRef),
System.Data.Services.Design (2)
System\Data\EntityModel\Emitters\NavigationPropertyEmitter.cs (1)
164
valueRef = new
CodeCastExpression
(typeRef, valueRef);
System\Data\EntityModel\Emitters\PropertyEmitter.cs (1)
290
new
CodeCastExpression
(typeof(byte[]),
System.Management (48)
WmiGenerator.cs (48)
1192
cmp.GetStatements.Add (new CodeMethodReturnStatement (new
CodeCastExpression
(cmp.Type,cie)));
1382
cis.TrueStatements.Add(new CodeMethodReturnStatement (new
CodeCastExpression
(cmp.Type,cmie )));
1477
cmp.GetStatements.Add (new CodeMethodReturnStatement (new
CodeCastExpression
(cmp.Type,cmie )));
1482
cmp.GetStatements.Add (new CodeMethodReturnStatement (new
CodeCastExpression
(cmp.Type,cie)));
2129
cmie.Method.TargetObject = new
CodeCastExpression
(new CodeTypeReference(((CodeTypeReference)arrKeyType[i]).BaseType + " "),new CodeVariableReferenceExpression("key"+arrKeys[i]));
2279
cmieInit.Parameters.Add(new
CodeCastExpression
(
3029
cis.TrueStatements.Add(new CodeAssignStatement(cie,new
CodeCastExpression
(new CodeTypeReference(cpde.Type.BaseType + " "),
3034
cis.TrueStatements.Add(new CodeAssignStatement(cie,new
CodeCastExpression
(cpde.Type,new CodeVariableReferenceExpression(cpde.Name))));
3145
new
CodeCastExpression
(ConvertCIMType(prop.Type,prop.IsArray),
3228
new
CodeCastExpression
((CodeTypeReference)inoutParamsType[i],
3310
new
CodeCastExpression
(retRefType,new CodePropertyReferenceExpression(cie,"Value"))));
4450
coce.Parameters.Add(new
CodeCastExpression
(new CodeTypeReference(PublicNamesUsed["LateBoundClass"].ToString()),cmie1));
4564
coce.Parameters.Add(new
CodeCastExpression
(new CodeTypeReference(PublicNamesUsed["LateBoundClass"].ToString()),
5462
new
CodeCastExpression
(new CodeTypeReference("System.String"),
5589
new
CodeCastExpression
(new CodeTypeReference("System.String"),
5623
CodeExpression cs = new
CodeCastExpression
(new CodeTypeReference("System.Array"),
5659
new
CodeCastExpression
(new CodeTypeReference("System.String"),cmie1),
5738
ce = new
CodeCastExpression
(new CodeTypeReference("System.String"),new CodePropertyReferenceExpression(prop,"Value"));
5742
ce = new
CodeCastExpression
(new CodeTypeReference("System.String"),prop);
5776
new
CodeCastExpression
(
5786
new
CodeCastExpression
(
5844
cmie1.Method.TargetObject = new
CodeCastExpression
(new CodeTypeReference("System.Array"),new CodePropertyReferenceExpression(prop,"Value"));
5848
cmie1.Method.TargetObject = new
CodeCastExpression
(new CodeTypeReference("System.Array"), prop);
5908
new
CodeCastExpression
(
5964
cmie1.Method.TargetObject = new
CodeCastExpression
(new CodeTypeReference("System.Array"),varValue);
6044
cmie1.Parameters.Add(new
CodeCastExpression
(new CodeTypeReference("System.DateTime"),beginingExpression));
6052
cmie2.Parameters.Add(new
CodeCastExpression
(new CodeTypeReference("System.TimeSpan"),beginingExpression));
6058
return new CodePropertyReferenceExpression(new
CodeCastExpression
(
6134
new
CodeCastExpression
(new CodeTypeReference("System.Array"),ciProp)));
6168
new
CodeCastExpression
(new CodeTypeReference(strEnumName),cmie2 )));
6578
cast = new
CodeCastExpression
("System.Int64", cboe);
6758
cast = new
CodeCastExpression
("System.Int64", cboe);
6829
cis.TrueStatements.Add(new CodeAssignStatement(new CodeVariableReferenceExpression(offsetAdjust),new
CodeCastExpression
(new CodeTypeReference("System.Int32"),cboe)));
6834
cmie.Parameters.Add(new
CodeCastExpression
("System.Double",new CodeVariableReferenceExpression(offsetAdjust)));
6907
new
CodeCastExpression
(
6997
cmie.Method = new CodeMethodReferenceExpression(new
CodeCastExpression
(new CodeTypeReference("System.Int32 "),cpre1),"ToString");
7014
cmie.Method = new CodeMethodReferenceExpression(new
CodeCastExpression
(new CodeTypeReference("System.Int32 "),cpre1),"ToString");
7031
cmie.Method = new CodeMethodReferenceExpression(new
CodeCastExpression
(new CodeTypeReference("System.Int32 "),cpre1),"ToString");
7086
new
CodeCastExpression
("System.Int64", cboe2)
7094
cmie.Method = new CodeMethodReferenceExpression(new
CodeCastExpression
(new CodeTypeReference("System.Int64 "),new CodeVariableReferenceExpression(microsec)),"ToString");
7194
cast = new
CodeCastExpression
("System.Int64", cboe);
7250
cmie1.Method = new CodeMethodReferenceExpression(new
CodeCastExpression
(new CodeTypeReference("System.Int64 "),cboe2),"ToString");
7268
cmie1.Method = new CodeMethodReferenceExpression(new
CodeCastExpression
(new CodeTypeReference("System.Int64 "),new CodeVariableReferenceExpression(OffsetMins)),"ToString");
7295
cmie1.Method = new CodeMethodReferenceExpression(new
CodeCastExpression
(new CodeTypeReference("System.Int32 "),
7376
cast = new
CodeCastExpression
("System.Int64", cboe2);
7389
cmie1.Method = new CodeMethodReferenceExpression(new
CodeCastExpression
(new CodeTypeReference("System.Int64 "),
7449
cmie.Method = new CodeMethodReferenceExpression(new
CodeCastExpression
(new CodeTypeReference(strType),
7631
new
CodeCastExpression
(
System.ServiceModel (4)
System\ServiceModel\Description\ClientClassGenerator.cs (4)
267
CodeMethodInvokeExpression invokeMethod = new CodeMethodInvokeExpression(new CodeMethodReferenceExpression(new
CodeCastExpression
(ifaceType, new CodeThisReferenceExpression()), method.Name));
606
CodeCastExpression castExpr = new
CodeCastExpression
(propertyType, propertyValueExpr);
674
variableDecl.InitExpression = new
CodeCastExpression
(variableDecl.Type,
796
eventArgsDecl.InitExpression = new
CodeCastExpression
(invokeAsyncCompletedEventArgsTypeName,
System.Web (30)
Compilation\BaseCodeDomTreeGenerator.cs (3)
532
prop.GetStatements.Add(new CodeMethodReturnStatement(new
CodeCastExpression
(
654
new
CodeCastExpression
(declaredType, getObject),
662
prop.GetStatements.Add(new CodeMethodReturnStatement(new
CodeCastExpression
(declaredType, getObject)));
Compilation\BaseTemplateCodeDomTreeGenerator.cs (6)
130
parserDeclaration.InitExpression = new
CodeCastExpression
(
255
CodeCastExpression cast = new
CodeCastExpression
(builder.ControlType.FullName,
493
setStatement.Right = new
CodeCastExpression
(typeof(ITemplate), new CodeIndexerExpression(contentTemplatesFieldRef,
1066
CodeCastExpression castExpression = new
CodeCastExpression
(entry.ControlType, findControlCallExpression);
1255
new
CodeCastExpression
(builder.ControlType,
1262
new
CodeCastExpression
(bindingContainerType,
Compilation\CodeDOMUtility.cs (5)
137
rightExpr = new
CodeCastExpression
(valueType, methCall);
259
methodInvoke.Method.TargetObject = new
CodeCastExpression
(typeof(IAttributeAccessor), target);
276
new
CodeCastExpression
(destinationType, value));
289
rightSide = new
CodeCastExpression
(destinationType, value);
353
CodeCastExpression castedExpression = new
CodeCastExpression
(castType, expression);
Compilation\DataBindingExpressionBuilder.cs (3)
90
new
CodeCastExpression
(controlBuilder.ControlType,
101
new
CodeCastExpression
(bindingContainerType,
125
new
CodeCastExpression
(itemType,
Compilation\ProfileBuildProvider.cs (3)
203
getLine = new CodeMethodReturnStatement(new
CodeCastExpression
(prop.Type, cmie));
253
getLine = new CodeMethodReturnStatement(new
CodeCastExpression
(prop.Type, cmie));
286
CodeMethodReturnStatement returnSatement = new CodeMethodReturnStatement(new
CodeCastExpression
(method.ReturnType, cmie));
Compilation\TemplateControlCodeDomTreeGenerator.cs (3)
74
new CodePropertyReferenceExpression(new
CodeCastExpression
(classTypeRef, new CodeThisReferenceExpression()), "AppRelativeVirtualPath"),
131
prop.GetStatements.Add(new CodeMethodReturnStatement(new
CodeCastExpression
(propertyType, propRef)));
268
prop.GetStatements.Add(new CodeMethodReturnStatement(new
CodeCastExpression
(
Configuration\BrowserCapabilitiesCodeGenerator.cs (6)
1186
valueAssignment.Right = new
CodeCastExpression
(typeof(string),
1198
valueAssignment.Right = new
CodeCastExpression
(typeof(string),
1265
valueAssignment.Right = (new
CodeCastExpression
(typeof(string),
1342
cmie.Parameters.Add(new
CodeCastExpression
(typeof(string),
1352
new
CodeCastExpression
(typeof(string),
1379
new
CodeCastExpression
(typeof(string),
UI\SimplePropertyEntry.cs (1)
69
new
CodeCastExpression
(typeof(IAttributeAccessor), ctrlRefExpr),
System.Web.Services (7)
System\Web\Services\Description\HttpProtocolImporter.cs (2)
180
mainCodeMethod.Statements.Add(new CodeMethodReturnStatement(new
CodeCastExpression
(method.MimeReturn.TypeName, invoke)));
222
endCodeMethod.Statements.Add(new CodeMethodReturnStatement(new
CodeCastExpression
(method.MimeReturn.TypeName, invoke)));
System\Web\Services\Description\SoapProtocolImporter.cs (3)
980
value = new
CodeCastExpression
(WebCodeGenerator.FullTypeName(parameter.mapping, ServiceImporter.CodeGenerator), value);
987
value = new
CodeCastExpression
(typeof(bool).FullName, value);
996
value = new
CodeCastExpression
(WebCodeGenerator.FullTypeName(parameters.Return, ServiceImporter.CodeGenerator), value);
System\Web\Services\Description\WebCodeGenerator.cs (2)
295
trueStatements[0] = new CodeVariableDeclarationStatement(typeof(InvokeCompletedEventArgs), "invokeArgs", new
CodeCastExpression
(typeof(InvokeCompletedEventArgs), new CodeArgumentReferenceExpression("arg")));
414
ret.Expression = new
CodeCastExpression
(typeName, valueRef);
System.Workflow.Activities (6)
Rules\Expressions.cs (3)
786
RuleExpressionWalker.Decompile(stringBuilder, leftExpr, new
CodeCastExpression
());
845
RuleExpressionWalker.Decompile(stringBuilder, rightExpr, new
CodeCastExpression
());
2231
CodeCastExpression newCast = new
CodeCastExpression
();
Rules\Parser\Parser.cs (1)
1364
unaryResult = new
CodeCastExpression
(typeRef, unaryResult);
WebServiceReceive.cs (2)
851
CodeExpression rightExpression = new
CodeCastExpression
(new CodeTypeReference(pinfo.ParameterType.GetElementType().FullName), new CodeIndexerExpression(new CodeVariableReferenceExpression("results"), new CodePrimitiveExpression(i + iStartIndex)));
866
CodeMethodReturnStatement methodReturnStatement = new CodeMethodReturnStatement(new
CodeCastExpression
(methodInfo.ReturnType, new CodeIndexerExpression(returnTargetExpression, new CodePrimitiveExpression(0))));
System.Workflow.ComponentModel (3)
AuthoringOM\Serializer\DependencyObjectCodeDomSerializer.cs (1)
119
codeMethodInvokeExpr = new CodeMethodInvokeExpression(objectExpression, "SetBinding", new CodeExpression[] { param1, new
CodeCastExpression
(new CodeTypeReference(typeof(ActivityBind)), param2) });
AuthoringOM\Serializer\PrimitiveCodeDomSerializer.cs (2)
64
expression = new
CodeCastExpression
(value.GetType(), expression);
87
return new
CodeCastExpression
(new CodeTypeReference(value.GetType()), expression);
System.Xml (3)
System\Xml\Serialization\XmlCodeExporter.cs (3)
238
initExpression = new
CodeCastExpression
(type.FullName, new CodePrimitiveExpression(value));
251
initExpression = new
CodeCastExpression
(type.FullName, new CodePrimitiveExpression(value));
283
initExpression = new
CodeCastExpression
(mapping.TypeDesc.FullName, initExpression);
XamlBuildTask (6)
Microsoft\Build\Tasks\Xaml\ClassGenerator.cs (6)
271
codeExp = new
CodeCastExpression
{ TargetType = new CodeTypeReference(typeof(object)), Expression = new CodePrimitiveExpression(null) };
619
new
CodeCastExpression
(
639
CodeCastExpression iDisposibleCastXmlReader = new
CodeCastExpression
(typeof(IDisposable), xmlReaderVar);
646
CodeCastExpression iDisposibleCastXamlReader = new
CodeCastExpression
(typeof(IDisposable), xamlReaderVar);
653
CodeCastExpression iDisposibleCastObjWriter = new
CodeCastExpression
(typeof(IDisposable), objWriterVar);
1164
new
CodeCastExpression
(typeof(XamlSchemaContext), new CodePropertyReferenceExpression(schemaContext, "Target")));
44 references to CodeCastExpression
PresentationBuildTasks (4)
BuildTasks\Ms\Internal\MarkupCompiler\MarkupCompiler.cs (4)
1015
CodeCastExpression
cceTarget = new CodeCastExpression(KnownTypes.Types[(int)KnownElements.Style], careTarget);
1050
CodeCastExpression
cceTarget;
1194
CodeCastExpression
cceTarget = new CodeCastExpression(cc.ElementTypeReference, careTarget);
2818
CodeCastExpression
cceCD = new CodeCastExpression(typeof(Delegate), cmieCD);
System (12)
compmod\microsoft\csharp\csharpcodeprovider.cs (3)
800
private void GenerateCastExpression(
CodeCastExpression
e) {
1669
else if (e is
CodeCastExpression
) {
1670
GenerateCastExpression((
CodeCastExpression
)e);
compmod\microsoft\visualbasic\VBCodeProvider.cs (1)
1178
protected override void GenerateCastExpression(
CodeCastExpression
e) {
compmod\system\codedom\CodeCastExpression.cs (2)
34
/// Initializes a new instance of <see cref='System.CodeDom.
CodeCastExpression
'/>.
42
/// Initializes a new instance of <see cref='System.CodeDom.
CodeCastExpression
'/> using the specified
compmod\system\codedom\compiler\CodeGenerator.cs (3)
611
else if (e is
CodeCastExpression
) {
612
GenerateCastExpression((
CodeCastExpression
)e);
1388
protected abstract void GenerateCastExpression(
CodeCastExpression
e);
compmod\system\codedom\compiler\CodeValidator.cs (3)
594
else if (e is
CodeCastExpression
) {
595
ValidateCastExpression((
CodeCastExpression
)e);
691
private void ValidateCastExpression(
CodeCastExpression
e) {
System.Management (2)
WmiGenerator.cs (2)
6436
CodeCastExpression
cast = null;
7149
CodeCastExpression
cast = null;
System.ServiceModel (1)
System\ServiceModel\Description\ClientClassGenerator.cs (1)
606
CodeCastExpression
castExpr = new CodeCastExpression(propertyType, propertyValueExpr);
System.Web (4)
Compilation\BaseTemplateCodeDomTreeGenerator.cs (2)
255
CodeCastExpression
cast = new CodeCastExpression(builder.ControlType.FullName,
1066
CodeCastExpression
castExpression = new CodeCastExpression(entry.ControlType, findControlCallExpression);
Compilation\CodeDOMUtility.cs (2)
347
internal static
CodeCastExpression
BuildJSharpCastExpression(Type castType, CodeExpression expression) {
353
CodeCastExpression
castedExpression = new CodeCastExpression(castType, expression);
System.Workflow.Activities (18)
Rules\CodeDomDecompiler.cs (1)
414
map.Add(typeof(
CodeCastExpression
), GetCastPrecedence);
Rules\Expressions.cs (16)
1991
CodeCastExpression
castExpr = (
CodeCastExpression
)expression;
1995
message = string.Format(CultureInfo.CurrentCulture, Messages.CannotWriteToExpression, typeof(
CodeCastExpression
).ToString());
2150
CodeCastExpression
castExpr = (
CodeCastExpression
)expression;
2158
CodeCastExpression
castExpr = (
CodeCastExpression
)expression;
2198
CodeCastExpression
castExpr = (
CodeCastExpression
)expression;
2230
CodeCastExpression
castExpr = (
CodeCastExpression
)expression;
2231
CodeCastExpression
newCast = new CodeCastExpression();
2239
CodeCastExpression
castExpr = (
CodeCastExpression
)expression;
2240
CodeCastExpression
castComperand = (
CodeCastExpression
)comperand;
Rules\Walker.cs (1)
85
new TypeWrapperTuple(typeof(
CodeCastExpression
), new CastExpression()),
XamlBuildTask (3)
Microsoft\Build\Tasks\Xaml\ClassGenerator.cs (3)
639
CodeCastExpression
iDisposibleCastXmlReader = new CodeCastExpression(typeof(IDisposable), xmlReaderVar);
646
CodeCastExpression
iDisposibleCastXamlReader = new CodeCastExpression(typeof(IDisposable), xamlReaderVar);
653
CodeCastExpression
iDisposibleCastObjWriter = new CodeCastExpression(typeof(IDisposable), objWriterVar);