Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / XamlBuildTask / Microsoft / Build / Tasks / Xaml / CompilationPass2Task.cs / 1305376 / CompilationPass2Task.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace Microsoft.Build.Tasks.Xaml { using System; using System.Collections.Generic; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; using System.Reflection; using System.Runtime; [Fx.Tag.XamlVisible(true)] public class CompilationPass2Task : Task { public CompilationPass2Task() { } [Fx.Tag.KnownXamlExternal] public ITaskItem[] ApplicationMarkup { get; set; } public string AssemblyName { get; set; } [Fx.Tag.KnownXamlExternal] public ITaskItem[] References { get; set; } public string LocalAssemblyReference { get; set; } public string RootNamespace { get; set; } public string BuildTaskPath { get; set; } public override bool Execute() { AppDomain appDomain = null; try { appDomain = XamlBuildTaskServices.CreateAppDomain("CompilationPass2AppDomain_" + Guid.NewGuid(), BuildTaskPath); CompilationPass2TaskInternal wrapper = (CompilationPass2TaskInternal)appDomain.CreateInstanceAndUnwrap( Assembly.GetExecutingAssembly().FullName, typeof(CompilationPass2TaskInternal).FullName); PopulateBuildArtifacts(wrapper); bool ret = wrapper.Execute(); if (!ret) { foreach (LogData logData in wrapper.LogData) { XamlBuildTaskServices.LogException( this, logData.Message, logData.FileName, logData.LineNumber, logData.LinePosition); } } return ret; } catch (Exception e) { if (Fx.IsFatal(e)) { throw; } XamlBuildTaskServices.LogException(this, e.Message); return false; } finally { if (appDomain != null) { AppDomain.Unload(appDomain); } } } void PopulateBuildArtifacts(CompilationPass2TaskInternal wrapper) { IListapplicationMarkup = new List (this.ApplicationMarkup.Length); foreach (ITaskItem taskItem in this.ApplicationMarkup) { applicationMarkup.Add(taskItem.ItemSpec); } wrapper.ApplicationMarkup = applicationMarkup; IList references = new List (this.References.Length); foreach (ITaskItem reference in this.References) { references.Add(reference.ItemSpec); } wrapper.References = references; wrapper.LocalAssemblyReference = this.LocalAssemblyReference; wrapper.AssemblyName = this.AssemblyName; wrapper.RootNamespace = this.RootNamespace; } } } // 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
- XPathScanner.cs
- selecteditemcollection.cs
- NameSpaceEvent.cs
- unitconverter.cs
- RemoveStoryboard.cs
- PkcsMisc.cs
- AttributeData.cs
- Membership.cs
- SynthesizerStateChangedEventArgs.cs
- DescendantOverDescendantQuery.cs
- FlagPanel.cs
- DeleteWorkflowOwnerCommand.cs
- MissingFieldException.cs
- IItemContainerGenerator.cs
- CellIdBoolean.cs
- ForwardPositionQuery.cs
- RtfToXamlReader.cs
- ConfigurationPermission.cs
- ExcCanonicalXml.cs
- RadioButtonBaseAdapter.cs
- WebBrowserBase.cs
- XmlUtilWriter.cs
- AlternationConverter.cs
- StdRegProviderWrapper.cs
- X509SubjectKeyIdentifierClause.cs
- Vector3D.cs
- DataServiceProviderWrapper.cs
- NativeCompoundFileAPIs.cs
- BamlRecordReader.cs
- HtmlShim.cs
- QuestionEventArgs.cs
- Win32SafeHandles.cs
- SoapWriter.cs
- PerfCounters.cs
- BrowserDefinition.cs
- PrefixQName.cs
- Pair.cs
- ActivityLocationReferenceEnvironment.cs
- SkinBuilder.cs
- SqlBulkCopy.cs
- ProcessHostFactoryHelper.cs
- TextEditorCopyPaste.cs
- Parameter.cs
- RootBrowserWindowAutomationPeer.cs
- RTTrackingProfile.cs
- SchemaNotation.cs
- UserInitiatedNavigationPermission.cs
- FolderLevelBuildProvider.cs
- UnmanagedMemoryAccessor.cs
- PathGradientBrush.cs
- ChangePassword.cs
- SerializationSectionGroup.cs
- FilteredAttributeCollection.cs
- PageTheme.cs
- ClientSettings.cs
- ProcessingInstructionAction.cs
- SpellerError.cs
- AliasedSlot.cs
- ToolStripProgressBar.cs
- NativeBuffer.cs
- TaskForm.cs
- Hex.cs
- XamlFilter.cs
- AbstractExpressions.cs
- BitmapEncoder.cs
- ZipPackagePart.cs
- MappingMetadataHelper.cs
- NamedPipeConnectionPool.cs
- VisualBrush.cs
- Size.cs
- TextTrailingCharacterEllipsis.cs
- TextServicesContext.cs
- OracleString.cs
- SplineQuaternionKeyFrame.cs
- CacheOutputQuery.cs
- OleAutBinder.cs
- Select.cs
- PolyLineSegment.cs
- Compiler.cs
- BaseDataBoundControlDesigner.cs
- XmlDataSourceView.cs
- Odbc32.cs
- SqlServer2KCompatibilityCheck.cs
- UseAttributeSetsAction.cs
- InfiniteIntConverter.cs
- SafeProcessHandle.cs
- Rijndael.cs
- webbrowsersite.cs
- CqlGenerator.cs
- Documentation.cs
- Rect3D.cs
- Model3D.cs
- XmlSchemaSimpleType.cs
- DropShadowBitmapEffect.cs
- IdentifierCollection.cs
- IPAddressCollection.cs
- SchemaHelper.cs
- HwndHost.cs
- DataSourceControl.cs
- CodeGotoStatement.cs