Table of contents
TOC
Collapse the table of content
Expand the table of content

Core.AutoOpenAttribute Class (F#)

Den Delimarsky|Last Updated: 7/4/2016
|
1 Contributor

This attribute is used for two purposes. When applied to an assembly, it must be given a string argument, and this argument must indicate a valid module or namespace in that assembly. Source code files compiled with a reference to this assembly are processed in an environment where the given path is automatically opened.

Namespace/Module Path: Microsoft.FSharp.Core

Assembly: FSharp.Core (in FSharp.Core.dll)

Syntax

[<AttributeUsage(AttributeTargets.Class ||| AttributeTargets.Assembly, AllowMultiple = true)>]
[<Sealed>]
type AutoOpenAttribute =
class
new AutoOpenAttribute : string -> AutoOpenAttribute
new AutoOpenAttribute : unit -> AutoOpenAttribute
member this.Path :  string
end

Remarks

When applied to a module within an assembly, then the attribute must not be given any arguments. When the enclosing namespace is opened in user source code, the module is also implicitly opened.

You can also use the short form of the name, AutoOpen.

Constructors

MemberDescription
newCreates an attribute used to mark a namespace or module path to be automatically opened when an assembly is referenced

Instance Members

MemberDescription
PathIndicates the namespace or module to be automatically opened when an assembly is referenced or an enclosing module opened.

Platforms

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

Version Information

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

See Also

Microsoft.FSharp.Core Namespace (F#)

© 2017 Microsoft