Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / XamlBuildTask / Microsoft / Build / Tasks / Xaml / CodeDomExtensionMethods.cs / 1305376 / CodeDomExtensionMethods.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace Microsoft.Build.Tasks.Xaml
{
using System;
using System.CodeDom;
static class CodeDomExtensionMethods
{
internal static CodeVariableReferenceExpression DeclareVar(this CodeStatementCollection block, Type type,
string name, CodeExpression initExpression)
{
block.Add(new CodeVariableDeclarationStatement()
{
Name = name,
Type = new CodeTypeReference(type),
InitExpression = initExpression
});
return new CodeVariableReferenceExpression(name);
}
internal static CodeFieldReferenceExpression Field(this CodeExpression targetObject, string fieldName)
{
return new CodeFieldReferenceExpression(targetObject, fieldName);
}
internal static CodeMethodInvokeExpression Invoke(this CodeExpression targetObject, string methodName,
params CodeExpression[] parameters)
{
return new CodeMethodInvokeExpression(targetObject, methodName, parameters);
}
internal static CodeObjectCreateExpression New(this Type type, params CodeExpression[] parameters)
{
return new CodeObjectCreateExpression(type, parameters);
}
internal static CodePropertyReferenceExpression Property(this CodeExpression targetObject, string propertyName)
{
return new CodePropertyReferenceExpression(targetObject, propertyName);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RowUpdatingEventArgs.cs
- NamespaceCollection.cs
- AppendHelper.cs
- ResourceContainer.cs
- UriScheme.cs
- PixelFormat.cs
- DropShadowBitmapEffect.cs
- GACMembershipCondition.cs
- DataTable.cs
- LabelLiteral.cs
- XmlImplementation.cs
- OdbcRowUpdatingEvent.cs
- DesignerWebPartChrome.cs
- WebSysDescriptionAttribute.cs
- ConnectionsZone.cs
- HttpPostedFile.cs
- DocumentGrid.cs
- GenericQueueSurrogate.cs
- WebRequest.cs
- Rect3DValueSerializer.cs
- ExpressionBuilderContext.cs
- TemplateParser.cs
- TokenizerHelper.cs
- TypeExtension.cs
- ControlBuilder.cs
- LicenseException.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- OLEDB_Enum.cs
- RedistVersionInfo.cs
- User.cs
- GeometryHitTestParameters.cs
- CatalogPartCollection.cs
- SocketPermission.cs
- HtmlTitle.cs
- MimeMapping.cs
- GroupItemAutomationPeer.cs
- WebPartConnectionsConnectVerb.cs
- DBDataPermissionAttribute.cs
- translator.cs
- Buffer.cs
- DescendentsWalker.cs
- TabletDevice.cs
- ApplicationHost.cs
- CompModHelpers.cs
- FieldNameLookup.cs
- ArgumentElement.cs
- QilTypeChecker.cs
- Soap12ServerProtocol.cs
- Utils.cs
- AccessKeyManager.cs
- TypeToken.cs
- ImmutablePropertyDescriptorGridEntry.cs
- DataContractJsonSerializer.cs
- HebrewNumber.cs
- TextDecoration.cs
- FontCollection.cs
- DecoderBestFitFallback.cs
- selecteditemcollection.cs
- IFormattable.cs
- UpdatePanelTriggerCollection.cs
- DesignRelationCollection.cs
- FileDialog_Vista_Interop.cs
- OleServicesContext.cs
- Attributes.cs
- PropertyKey.cs
- InheritedPropertyDescriptor.cs
- SectionVisual.cs
- _DomainName.cs
- FontWeights.cs
- FilteredDataSetHelper.cs
- DispatcherProcessingDisabled.cs
- Point3DAnimationUsingKeyFrames.cs
- TargetControlTypeAttribute.cs
- TextTrailingCharacterEllipsis.cs
- SessionStateUtil.cs
- DataGridViewAddColumnDialog.cs
- Stack.cs
- WebBaseEventKeyComparer.cs
- Visual3DCollection.cs
- TextDecorationCollection.cs
- RowTypePropertyElement.cs
- DeleteCardRequest.cs
- WebPartHeaderCloseVerb.cs
- CodeDomDecompiler.cs
- PipelineModuleStepContainer.cs
- BounceEase.cs
- ProgressBarRenderer.cs
- VectorCollectionConverter.cs
- KnownTypesProvider.cs
- SiteMapSection.cs
- UIPropertyMetadata.cs
- MetadataAssemblyHelper.cs
- Stylus.cs
- InternalPermissions.cs
- IdentityManager.cs
- Semaphore.cs
- ipaddressinformationcollection.cs
- WrappedIUnknown.cs
- AsyncCompletedEventArgs.cs
- ProgressBar.cs