Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------ // 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
- XsltLoader.cs
- ActivatableWorkflowsQueryResult.cs
- AppModelKnownContentFactory.cs
- PreDigestedSignedInfo.cs
- DrawingServices.cs
- RichTextBox.cs
- SemaphoreFullException.cs
- Models.cs
- SqlExpander.cs
- PagedDataSource.cs
- FontConverter.cs
- ClientRuntimeConfig.cs
- SetStoryboardSpeedRatio.cs
- NativeMethods.cs
- SerialErrors.cs
- ConstraintEnumerator.cs
- Automation.cs
- DataServiceCollectionOfT.cs
- DataGridViewControlCollection.cs
- IRCollection.cs
- TemplatedAdorner.cs
- Instrumentation.cs
- IApplicationTrustManager.cs
- ReferencedCollectionType.cs
- HebrewCalendar.cs
- ListViewInsertedEventArgs.cs
- ImageAutomationPeer.cs
- HTMLTagNameToTypeMapper.cs
- LinearKeyFrames.cs
- CollectionCodeDomSerializer.cs
- QueryableFilterUserControl.cs
- LambdaCompiler.Unary.cs
- SimpleMailWebEventProvider.cs
- ExpiredSecurityTokenException.cs
- SizeAnimationBase.cs
- TypeBuilder.cs
- WebPartVerb.cs
- GroupBoxRenderer.cs
- ListViewGroupConverter.cs
- MissingMemberException.cs
- MultiTrigger.cs
- Point3DIndependentAnimationStorage.cs
- CharacterHit.cs
- AttributeConverter.cs
- WSSecurityPolicy11.cs
- XmlResolver.cs
- SecurityPolicySection.cs
- DesignerOptionService.cs
- SoapSchemaExporter.cs
- SrgsItemList.cs
- TypeElementCollection.cs
- FileDialogCustomPlace.cs
- SmtpNtlmAuthenticationModule.cs
- SerializableAttribute.cs
- Delegate.cs
- XmlSerializationReader.cs
- DrawingCollection.cs
- DoubleCollectionValueSerializer.cs
- Processor.cs
- CommentEmitter.cs
- UnmanagedMarshal.cs
- HwndAppCommandInputProvider.cs
- SchemaNotation.cs
- AbstractExpressions.cs
- CompressionTracing.cs
- XmlSerializerNamespaces.cs
- MetadataItemCollectionFactory.cs
- ClassHandlersStore.cs
- BinaryWriter.cs
- HideDisabledControlAdapter.cs
- RelatedCurrencyManager.cs
- DateTimeFormatInfo.cs
- StatusBarPanelClickEvent.cs
- LockedHandleGlyph.cs
- figurelength.cs
- ActionNotSupportedException.cs
- Component.cs
- SystemWebSectionGroup.cs
- COAUTHINFO.cs
- ConfigurationLockCollection.cs
- VectorAnimationUsingKeyFrames.cs
- COM2PropertyBuilderUITypeEditor.cs
- ProxyHwnd.cs
- WebPartsSection.cs
- CalendarDateChangedEventArgs.cs
- TemplateComponentConnector.cs
- SettingsPropertyValue.cs
- ThreadAttributes.cs
- RewritingPass.cs
- RegistrySecurity.cs
- RunInstallerAttribute.cs
- TraceContext.cs
- SessionIDManager.cs
- Pointer.cs
- FrameAutomationPeer.cs
- XPathNavigatorException.cs
- XPathSelfQuery.cs
- InlineObject.cs
- SortAction.cs
- TypedAsyncResult.cs