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