Show / Hide Table of Contents

Class FileReference

Inheritance
System.Object
FileReference
CsvFileReference
ImageReference
KmReference
StlReference
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()
Namespace: CompAnalytics.Contracts
Assembly: CompAnalytics.Contracts.dll
Syntax
[DataContract]
[Serializable]
public class FileReference

Constructors

FileReference()

Declaration
protected FileReference()
Remarks

Private constructor ensures that creation only occurs through the factory method

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
Type Description
FileReference

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 Description
T
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
Type Description
FileReference

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 Description
T
Type Parameters
Name Description
T

Operators

Explicit(FileReference to Uri)

Declaration
public static explicit operator Uri(FileReference val)
Parameters
Type Name Description
FileReference val
Returns
Type Description
System.Uri
Back to top Copyright © 2019 Composable Analytics, Inc.