Class FileReference
Inheritance
System.Object
FileReference
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: CompAnalytics.Contracts.dll
Syntax
[DataContract]
[Serializable]
public class FileReference
Constructors
FileReference()
Declaration
protected FileReference()
Properties
LocalFile
Declaration
public string LocalFile { get; protected set; }
Property Value
| Type |
Description |
| System.String |
|
Uri
Declaration
[DataMember]
public Uri Uri { get; set; }
Property Value
| Type |
Description |
| System.Uri |
|
Methods
Create(String, Uri)
Factory method to create a new FileReference.
Declaration
public static FileReference Create(string localFile, Uri uri)
Parameters
| Type |
Name |
Description |
| System.String |
localFile |
Absolute local path of the referenced file on the system (or network drive)
|
| System.Uri |
uri |
HTTP-accessible URI pointing to the file relative to the Composable run directory
|
Returns
Create<T>(String, Uri)
Factory method to create a new FileReference.
Declaration
public static T Create<T>(string localFile, Uri uri)where T : FileReference
Parameters
| Type |
Name |
Description |
| System.String |
localFile |
Absolute local path of the referenced file on the system (or network drive)
|
| System.Uri |
uri |
HTTP-accessible URI pointing to the file relative to the IRunPathExtension::VirtualRunPath
|
Returns
Type Parameters
| Name |
Description |
| T |
FileReference or one of its subclasses. The desired type of FileReference to return.
|
CreateFile()
Creates a file at the path represented by the FileReference and returns a read/write FileStream on the file.
Declaration
public FileStream CreateFile()
Returns
| Type |
Description |
| System.IO.FileStream |
|
CreateWithAbsoluteUri(String, Uri)
Should be used sparingly in cases when a FileReference must be created using an absolute URI (usually for a file stored remotely).
Declaration
public static FileReference CreateWithAbsoluteUri(string localFile, Uri uri)
Parameters
| Type |
Name |
Description |
| System.String |
localFile |
|
| System.Uri |
uri |
|
Returns
CreateWithAbsoluteUri<T>(String, Uri)
Should be used sparingly in cases when a FileReference must be created using an absolute URI (usually for a file stored remotely).
Declaration
public static T CreateWithAbsoluteUri<T>(string localFile, Uri uri)where T : FileReference
Parameters
| Type |
Name |
Description |
| System.String |
localFile |
|
| System.Uri |
uri |
|
Returns
Type Parameters
Operators
Explicit(FileReference to Uri)
Declaration
public static explicit operator Uri(FileReference val)
Parameters
Returns
| Type |
Description |
| System.Uri |
|