Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / CodeDOM / Compiler / CompilerResults.cs / 1305376 / CompilerResults.cs
//------------------------------------------------------------------------------ //// // //----------------------------------------------------------------------------- namespace System.CodeDom.Compiler { using System; using System.CodeDom; using System.Reflection; using System.Collections; using System.Collections.Specialized; using System.Security; using System.Security.Permissions; using System.Security.Policy; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Versioning; using System.IO; ///[....] // Copyright (c) Microsoft Corporation. All rights reserved. ///// [Serializable()] [PermissionSet(SecurityAction.InheritanceDemand, Name="FullTrust")] public class CompilerResults { private CompilerErrorCollection errors = new CompilerErrorCollection(); private StringCollection output = new StringCollection(); private Assembly compiledAssembly; private string pathToAssembly; private int nativeCompilerReturnValue; private TempFileCollection tempFiles; private Evidence evidence; ////// Represents the results /// of compilation from the compiler. /// ////// [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] public CompilerResults(TempFileCollection tempFiles) { this.tempFiles = tempFiles; } ////// Initializes a new instance of ////// that uses the specified /// temporary files. /// /// public TempFileCollection TempFiles { [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] get { return tempFiles; } [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] set { tempFiles = value; } } ////// Gets or sets the temporary files to use. /// ////// [Obsolete("CAS policy is obsolete and will be removed in a future release of the .NET Framework. Please see http://go2.microsoft.com/fwlink/?LinkId=131738 for more information.")] public Evidence Evidence { [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] get { Evidence e = null; if (evidence != null) e = evidence.Clone(); return e; } [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] [SecurityPermissionAttribute( SecurityAction.Demand, ControlEvidence = true )] set { if (value != null) evidence = value.Clone(); else evidence = null; } } ////// Set the evidence for partially trusted scenarios. /// ////// public Assembly CompiledAssembly { [SecurityPermissionAttribute(SecurityAction.Assert, Flags=SecurityPermissionFlag.ControlEvidence)] [ResourceExposure(ResourceScope.None)] [ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)] get { if (compiledAssembly == null && pathToAssembly != null) { AssemblyName assemName = new AssemblyName(); assemName.CodeBase = pathToAssembly; #pragma warning disable 618 // Load with evidence is obsolete - this warning is passed on via the Evidence property compiledAssembly = Assembly.Load(assemName,evidence); #pragma warning restore 618 } return compiledAssembly; } [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] set { compiledAssembly = value; } } ////// The compiled assembly. /// ////// public CompilerErrorCollection Errors { get { return errors; } } ////// Gets or sets the collection of compiler errors. /// ////// public StringCollection Output { [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] get { return output; } } ////// Gets or sets the compiler output messages. /// ////// public string PathToAssembly { [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] [ResourceExposure(ResourceScope.Machine)] get { return pathToAssembly; } [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] [ResourceExposure(ResourceScope.Machine)] set { pathToAssembly = value; } } ////// Gets or sets the path to the assembly. /// ////// public int NativeCompilerReturnValue { get { return nativeCompilerReturnValue; } [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] set { nativeCompilerReturnValue = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ ///// Gets or sets the compiler's return value. /// ///// // //----------------------------------------------------------------------------- namespace System.CodeDom.Compiler { using System; using System.CodeDom; using System.Reflection; using System.Collections; using System.Collections.Specialized; using System.Security; using System.Security.Permissions; using System.Security.Policy; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Versioning; using System.IO; ///[....] // Copyright (c) Microsoft Corporation. All rights reserved. ///// [Serializable()] [PermissionSet(SecurityAction.InheritanceDemand, Name="FullTrust")] public class CompilerResults { private CompilerErrorCollection errors = new CompilerErrorCollection(); private StringCollection output = new StringCollection(); private Assembly compiledAssembly; private string pathToAssembly; private int nativeCompilerReturnValue; private TempFileCollection tempFiles; private Evidence evidence; ////// Represents the results /// of compilation from the compiler. /// ////// [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] public CompilerResults(TempFileCollection tempFiles) { this.tempFiles = tempFiles; } ////// Initializes a new instance of ////// that uses the specified /// temporary files. /// /// public TempFileCollection TempFiles { [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] get { return tempFiles; } [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] set { tempFiles = value; } } ////// Gets or sets the temporary files to use. /// ////// [Obsolete("CAS policy is obsolete and will be removed in a future release of the .NET Framework. Please see http://go2.microsoft.com/fwlink/?LinkId=131738 for more information.")] public Evidence Evidence { [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] get { Evidence e = null; if (evidence != null) e = evidence.Clone(); return e; } [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] [SecurityPermissionAttribute( SecurityAction.Demand, ControlEvidence = true )] set { if (value != null) evidence = value.Clone(); else evidence = null; } } ////// Set the evidence for partially trusted scenarios. /// ////// public Assembly CompiledAssembly { [SecurityPermissionAttribute(SecurityAction.Assert, Flags=SecurityPermissionFlag.ControlEvidence)] [ResourceExposure(ResourceScope.None)] [ResourceConsumption(ResourceScope.Machine, ResourceScope.Machine)] get { if (compiledAssembly == null && pathToAssembly != null) { AssemblyName assemName = new AssemblyName(); assemName.CodeBase = pathToAssembly; #pragma warning disable 618 // Load with evidence is obsolete - this warning is passed on via the Evidence property compiledAssembly = Assembly.Load(assemName,evidence); #pragma warning restore 618 } return compiledAssembly; } [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] set { compiledAssembly = value; } } ////// The compiled assembly. /// ////// public CompilerErrorCollection Errors { get { return errors; } } ////// Gets or sets the collection of compiler errors. /// ////// public StringCollection Output { [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] get { return output; } } ////// Gets or sets the compiler output messages. /// ////// public string PathToAssembly { [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] [ResourceExposure(ResourceScope.Machine)] get { return pathToAssembly; } [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] [ResourceExposure(ResourceScope.Machine)] set { pathToAssembly = value; } } ////// Gets or sets the path to the assembly. /// ////// public int NativeCompilerReturnValue { get { return nativeCompilerReturnValue; } [PermissionSet(SecurityAction.LinkDemand, Name="FullTrust")] set { nativeCompilerReturnValue = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007./// Gets or sets the compiler's return value. /// ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StyleSheet.cs
- IntSecurity.cs
- HttpsTransportBindingElement.cs
- TargetPerspective.cs
- XmlCharacterData.cs
- DefaultWorkflowSchedulerService.cs
- Error.cs
- MatrixAnimationUsingPath.cs
- XmlLanguage.cs
- DashStyle.cs
- CodeDomSerializerException.cs
- PasswordBox.cs
- SqlReorderer.cs
- ChtmlTextWriter.cs
- ProcessManager.cs
- TrackingProfile.cs
- LocalServiceSecuritySettings.cs
- Operator.cs
- precedingsibling.cs
- Positioning.cs
- ProjectionQueryOptionExpression.cs
- XhtmlMobileTextWriter.cs
- DataSet.cs
- MultiDataTrigger.cs
- ContentAlignmentEditor.cs
- __Filters.cs
- XmlTextEncoder.cs
- DataGridCellClipboardEventArgs.cs
- IPEndPoint.cs
- ParentQuery.cs
- ErrorWrapper.cs
- RemoteArgument.cs
- NullableDoubleSumAggregationOperator.cs
- FileSystemWatcher.cs
- MSHTMLHost.cs
- PrintController.cs
- SynchronizedReadOnlyCollection.cs
- TdsParserSafeHandles.cs
- PropertyOverridesTypeEditor.cs
- Compiler.cs
- GetBrowserTokenRequest.cs
- Operators.cs
- SmtpClient.cs
- MultiBindingExpression.cs
- LookupNode.cs
- SecurityKeyEntropyMode.cs
- Path.cs
- SimpleHandlerFactory.cs
- SafeFileMappingHandle.cs
- ModuleElement.cs
- JsonReader.cs
- GenericNameHandler.cs
- TraceHandlerErrorFormatter.cs
- ToolboxItemAttribute.cs
- MenuItem.cs
- UnconditionalPolicy.cs
- XmlSchemaObject.cs
- StoreItemCollection.Loader.cs
- UserCancellationException.cs
- ParenthesizePropertyNameAttribute.cs
- ConfigXmlElement.cs
- MetabaseServerConfig.cs
- Native.cs
- TableRowGroup.cs
- TypeEnumerableViewSchema.cs
- BooleanAnimationUsingKeyFrames.cs
- XmlSigningNodeWriter.cs
- ZipArchive.cs
- AnnotationResource.cs
- CorrelationService.cs
- EndpointAddressMessageFilterTable.cs
- XmlImplementation.cs
- AssemblyBuilderData.cs
- PersonalizationDictionary.cs
- ZipFileInfoCollection.cs
- HttpContextBase.cs
- DateTimeConstantAttribute.cs
- RightNameExpirationInfoPair.cs
- MimeWriter.cs
- ScriptingRoleServiceSection.cs
- TriggerBase.cs
- ToggleButtonAutomationPeer.cs
- followingsibling.cs
- BrushMappingModeValidation.cs
- AliasedSlot.cs
- SchemaImporterExtensionElement.cs
- DataGridViewComponentPropertyGridSite.cs
- AppDomainUnloadedException.cs
- ContentType.cs
- LogConverter.cs
- MethodBuilderInstantiation.cs
- SiteIdentityPermission.cs
- TextBlockAutomationPeer.cs
- DropAnimation.xaml.cs
- DockAndAnchorLayout.cs
- ColorConvertedBitmap.cs
- errorpatternmatcher.cs
- smtppermission.cs
- SmtpAuthenticationManager.cs
- MessageAction.cs