From efb74c8745470a9cbfa6a00a1b90a650252a54e6 Mon Sep 17 00:00:00 2001 From: Martin Ingvar Kofoed Jensen Date: Fri, 11 Mar 2011 12:44:18 +0100 Subject: [PATCH] Changing title to C1 2.1! --- Composite/Core/IO/C1DirectoryInfo.cs | 5 +- Composite/Core/IO/C1File.cs | 348 ++++++++++++++------------- Composite/Properties/AssemblyInfo.cs | 2 +- 3 files changed, 181 insertions(+), 174 deletions(-) diff --git a/Composite/Core/IO/C1DirectoryInfo.cs b/Composite/Core/IO/C1DirectoryInfo.cs index 861d95c368..837849e6cb 100644 --- a/Composite/Core/IO/C1DirectoryInfo.cs +++ b/Composite/Core/IO/C1DirectoryInfo.cs @@ -10,9 +10,10 @@ namespace Composite.Core.IO /// /// This class is a almost one to one version of System.IO.DirectoryInfo. Using this implementation instead - /// of System.IO.Directory, will ensure that your code will work both on Standard Windows deployment + /// of System.IO.DirectoryInfo, will ensure that your code will work both on Standard Windows deployment /// and Windows Azure deployment. /// See System.IO.DirectoryInfo for more documentation on the methods of this class. + /// See . /// public class C1DirectoryInfo : C1FileSystemInfo { @@ -209,7 +210,7 @@ public void Create() /// /// Creates a subdirectory. /// - /// + /// Path to directory to create. /// public C1DirectoryInfo CreateSubdirectory(string path) { diff --git a/Composite/Core/IO/C1File.cs b/Composite/Core/IO/C1File.cs index c2317e5864..83282b20fe 100644 --- a/Composite/Core/IO/C1File.cs +++ b/Composite/Core/IO/C1File.cs @@ -8,15 +8,19 @@ namespace Composite.Core.IO { /// - /// IOLayer - documentation pending + /// This class is a almost one to one version of System.IO.File. Using this implementation instead + /// of System.IO.File, will ensure that your code will work both on Standard Windows deployment + /// and Windows Azure deployment. + /// See System.IO.File for more documentation on the methods of this class. + /// See . /// public static class C1File { /// - /// IOLayer - documentation pending + /// Determins if the given file exists or not. /// - /// - /// + /// Path to the file. + /// Returns true if the file exists, false if not. public static bool Exists(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.Exists(path); @@ -25,10 +29,12 @@ public static bool Exists(string path) /// - /// IOLayer - documentation pending - /// This is not a port of the System.IO.File + /// This is not a port of the System.IO.File. This method can be used to 'touch' an + /// existing file. This is a way of telling the C1 IO system that the file has been + /// touched and C1 uses this to handle other than standard Windows deployments, like + /// Windows Azure. /// - /// + /// Path to file to touch. public static void Touch(string path) { ImplementationFactory.CurrentFactory.StatelessC1File.Touch(path); @@ -36,10 +42,10 @@ public static void Touch(string path) /// - /// IOLayer - documentation pending + /// Copies a file. /// - /// - /// + /// Source path of file to copy. + /// Target path of the file to be copied to. public static void Copy(string sourceFileName, string destFileName) { ImplementationFactory.CurrentFactory.StatelessC1File.Copy(sourceFileName, destFileName); @@ -48,11 +54,11 @@ public static void Copy(string sourceFileName, string destFileName) /// - /// IOLayer - documentation pending + /// Copies a file. /// - /// - /// - /// + /// Source path of file to copy. + /// Target path of the file to be copied to. + /// If this is true and the target path exists, it will be overwritten without any exceptions. public static void Copy(string sourceFileName, string destFileName, bool overwrite) { ImplementationFactory.CurrentFactory.StatelessC1File.Copy(sourceFileName, destFileName, overwrite); @@ -61,10 +67,10 @@ public static void Copy(string sourceFileName, string destFileName, bool overwri /// - /// IOLayer - documentation pending + /// Moves a file. /// - /// - /// + /// Path of file to move. + /// Destination path to move the file to. public static void Move(string sourceFileName, string destFileName) { ImplementationFactory.CurrentFactory.StatelessC1File.Move(sourceFileName, destFileName); @@ -73,10 +79,10 @@ public static void Move(string sourceFileName, string destFileName) /// - /// IOLayer - documentation pending + /// Replace a file with another file. /// - /// - /// + /// Path to source file. + /// Path to file to replace. /// public static void Replace(string sourceFileName, string destinationFileName, string destinationBackupFileName) { @@ -86,10 +92,10 @@ public static void Replace(string sourceFileName, string destinationFileName, st /// - /// IOLayer - documentation pending + /// Replace a file with another file. /// - /// - /// + /// Path to source file. + /// Path to file to replace. /// /// public static void Replace(string sourceFileName, string destinationFileName, string destinationBackupFileName, bool ignoreMetadataErrors) @@ -100,9 +106,9 @@ public static void Replace(string sourceFileName, string destinationFileName, st /// - /// IOLayer - documentation pending + /// Deletes the given file. /// - /// + /// Path to file to delete. public static void Delete(string path) { ImplementationFactory.CurrentFactory.StatelessC1File.Delete(path); @@ -111,10 +117,10 @@ public static void Delete(string path) /// - /// IOLayer - documentation pending + /// Creates a new file and returns a file stream to it . /// - /// - /// + /// Path to file to create. + /// Returns the newly created stream. public static C1FileStream Create(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.Create(path); @@ -123,11 +129,11 @@ public static C1FileStream Create(string path) /// - /// IOLayer - documentation pending + /// Creates a new file and returns a file stream to it . /// - /// - /// - /// + /// Path to file to create. + /// Buffer size of returned stream. + /// Returns the newly created stream. public static C1FileStream Create(string path, int bufferSize) { return ImplementationFactory.CurrentFactory.StatelessC1File.Create(path, bufferSize); @@ -136,12 +142,12 @@ public static C1FileStream Create(string path, int bufferSize) /// - /// IOLayer - documentation pending + /// Creates a new file and returns a file stream to it . /// - /// - /// - /// - /// + /// Path to file to create. + /// Buffer size of returned stream. + /// File options of returned stream. + /// Returns the newly created stream. public static C1FileStream Create(string path, int bufferSize, FileOptions options) { return ImplementationFactory.CurrentFactory.StatelessC1File.Create(path, bufferSize, options); @@ -150,10 +156,10 @@ public static C1FileStream Create(string path, int bufferSize, FileOptions optio /// - /// IOLayer - documentation pending + /// Creates a new file and returns a stream writer to it . /// - /// - /// + /// Path to file to create. + /// Returns the newly created . public static C1StreamWriter CreateText(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.CreateText(path); @@ -162,10 +168,10 @@ public static C1StreamWriter CreateText(string path) /// - /// IOLayer - documentation pending + /// Opens a for appending. /// - /// - /// + /// Path to file to append to. + /// Returns the newly opned . public static C1StreamWriter AppendText(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.AppendText(path); @@ -174,10 +180,10 @@ public static C1StreamWriter AppendText(string path) /// - /// IOLayer - documentation pending + /// Appends content to a file. /// - /// - /// + /// Path to file to append to. + /// Content to append to file. public static void AppendAllText(string path, string contents) { ImplementationFactory.CurrentFactory.StatelessC1File.AppendAllText(path, contents); @@ -186,11 +192,11 @@ public static void AppendAllText(string path, string contents) /// - /// IOLayer - documentation pending + /// Appends content to a file. /// - /// - /// - /// + /// Path to file to append to. + /// Content to append to file. + /// Encoding to use when appending. public static void AppendAllText(string path, string contents, Encoding encoding) { ImplementationFactory.CurrentFactory.StatelessC1File.AppendAllText(path, contents, encoding); @@ -199,10 +205,10 @@ public static void AppendAllText(string path, string contents, Encoding encoding /// - /// IOLayer - documentation pending + /// Appends content to a file. /// - /// - /// + /// Path to file to append to. + /// Content to append to file. public static void AppendAllLines(string path, IEnumerable contents) { ImplementationFactory.CurrentFactory.StatelessC1File.AppendAllLines(path, contents); @@ -211,11 +217,11 @@ public static void AppendAllLines(string path, IEnumerable contents) /// - /// IOLayer - documentation pending + /// Appends content to a file. /// - /// - /// - /// + /// Path to file to append to. + /// Content to append to file. + /// Encoding to use when appending. public static void AppendAllLines(string path, IEnumerable contents, Encoding encoding) { ImplementationFactory.CurrentFactory.StatelessC1File.AppendAllLines(path, contents, encoding); @@ -224,11 +230,11 @@ public static void AppendAllLines(string path, IEnumerable contents, Enc /// - /// IOLayer - documentation pending + /// Opens a file. /// - /// - /// - /// + /// Path to file to open. + /// File mode to use. + /// Returns the newly opened . public static C1FileStream Open(string path, FileMode mode) { return ImplementationFactory.CurrentFactory.StatelessC1File.Open(path, mode); @@ -237,12 +243,12 @@ public static C1FileStream Open(string path, FileMode mode) /// - /// IOLayer - documentation pending + /// Opens a file. /// - /// - /// - /// - /// + /// Path to file to open. + /// File mode to use. + /// File access to use. + /// Returns the newly opened . public static C1FileStream Open(string path, FileMode mode, FileAccess access) { return ImplementationFactory.CurrentFactory.StatelessC1File.Open(path, mode, access); @@ -251,13 +257,13 @@ public static C1FileStream Open(string path, FileMode mode, FileAccess access) /// - /// IOLayer - documentation pending + /// Opens a file. /// - /// - /// - /// - /// - /// + /// Path to file to open. + /// File mode to use. + /// File access to use. + /// File share to use. + /// Returns the newly opened . public static C1FileStream Open(string path, FileMode mode, FileAccess access, FileShare share) { return ImplementationFactory.CurrentFactory.StatelessC1File.Open(path, mode, access, share); @@ -266,10 +272,10 @@ public static C1FileStream Open(string path, FileMode mode, FileAccess access, F /// - /// IOLayer - documentation pending + /// Opens a file for reading. /// - /// - /// + /// Path to file to open. + /// Returns the newly opened . public static C1FileStream OpenRead(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.OpenRead(path); @@ -278,10 +284,10 @@ public static C1FileStream OpenRead(string path) /// - /// IOLayer - documentation pending + /// Opens a file. /// - /// - /// + /// Path to file to open. + /// Returns the newly opened . public static C1StreamReader OpenText(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.OpenText(path); @@ -290,10 +296,10 @@ public static C1StreamReader OpenText(string path) /// - /// IOLayer - documentation pending + /// Opens a file for writing. /// - /// - /// + /// Path to file to open. + /// Returns the newly opened . public static C1FileStream OpenWrite(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.OpenWrite(path); @@ -302,10 +308,10 @@ public static C1FileStream OpenWrite(string path) /// - /// IOLayer - documentation pending + /// Read all bytes from a file. /// - /// - /// + /// Path to file to read from. + /// Returns read bytes. public static byte[] ReadAllBytes(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.ReadAllBytes(path); @@ -314,10 +320,10 @@ public static byte[] ReadAllBytes(string path) /// - /// IOLayer - documentation pending + /// Read all lines from a file. /// - /// - /// + /// Path to file to read from. + /// Returns read lines. public static string[] ReadAllLines(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.ReadAllLines(path); @@ -326,11 +332,11 @@ public static string[] ReadAllLines(string path) /// - /// IOLayer - documentation pending + /// Read all lines from a file. /// - /// - /// - /// + /// Path to file to read from. + /// Encoding to use when reading. + /// Returns read lines. public static string[] ReadAllLines(string path, Encoding encoding) { return ImplementationFactory.CurrentFactory.StatelessC1File.ReadAllLines(path, encoding); @@ -339,10 +345,10 @@ public static string[] ReadAllLines(string path, Encoding encoding) /// - /// IOLayer - documentation pending + /// Read all text from a file. /// - /// - /// + /// Path to file to read from. + /// The content of the file. public static string ReadAllText(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.ReadAllText(path); @@ -351,11 +357,11 @@ public static string ReadAllText(string path) /// - /// IOLayer - documentation pending + /// Read all text from a file. /// - /// - /// - /// + /// Path to file to read from. + /// Encoding to use when reading. + /// The content of the file. public static string ReadAllText(string path, Encoding encoding) { return ImplementationFactory.CurrentFactory.StatelessC1File.ReadAllText(path, encoding); @@ -364,10 +370,10 @@ public static string ReadAllText(string path, Encoding encoding) /// - /// IOLayer - documentation pending + /// Read all lines from a file. /// - /// - /// + /// Path to file to read from. + /// Returns all read lines. public static IEnumerable ReadLines(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.ReadLines(path); @@ -376,11 +382,11 @@ public static IEnumerable ReadLines(string path) /// - /// IOLayer - documentation pending + /// Read all lines from a file. /// - /// - /// - /// + /// Path to file to read from. + /// Encoding to use when reading. + /// Returns all read lines. public static IEnumerable ReadLines(string path, Encoding encoding) { return ImplementationFactory.CurrentFactory.StatelessC1File.ReadLines(path, encoding); @@ -389,10 +395,10 @@ public static IEnumerable ReadLines(string path, Encoding encoding) /// - /// IOLayer - documentation pending + /// Writes bytes to a file. /// - /// - /// + /// Path to file to write to. + /// Bytes to write. public static void WriteAllBytes(string path, byte[] bytes) { ImplementationFactory.CurrentFactory.StatelessC1File.WriteAllBytes(path, bytes); @@ -401,10 +407,10 @@ public static void WriteAllBytes(string path, byte[] bytes) /// - /// IOLayer - documentation pending + /// Writes lines to a file. /// - /// - /// + /// Path to file to write to. + /// Lines to write. public static void WriteAllLines(string path, IEnumerable contents) { ImplementationFactory.CurrentFactory.StatelessC1File.WriteAllLines(path, contents); @@ -413,10 +419,10 @@ public static void WriteAllLines(string path, IEnumerable contents) /// - /// IOLayer - documentation pending + /// Writes lines to a file. /// - /// - /// + /// Path to file to write to. + /// Lines to write. public static void WriteAllLines(string path, string[] contents) { ImplementationFactory.CurrentFactory.StatelessC1File.WriteAllLines(path, contents); @@ -425,11 +431,11 @@ public static void WriteAllLines(string path, string[] contents) /// - /// IOLayer - documentation pending + /// Writes lines to a file. /// - /// - /// - /// + /// Path to file to write to. + /// Lines to write. + /// Encoding to use when writing. public static void WriteAllLines(string path, IEnumerable contents, Encoding encoding) { ImplementationFactory.CurrentFactory.StatelessC1File.WriteAllLines(path, contents, encoding); @@ -438,11 +444,11 @@ public static void WriteAllLines(string path, IEnumerable contents, Enco /// - /// IOLayer - documentation pending + /// Writes lines to a file. /// - /// - /// - /// + /// Path to file to write to. + /// Lines to write. + /// Encoding to use when writing. public static void WriteAllLines(string path, string[] contents, Encoding encoding) { ImplementationFactory.CurrentFactory.StatelessC1File.WriteAllLines(path, contents, encoding); @@ -451,10 +457,10 @@ public static void WriteAllLines(string path, string[] contents, Encoding encodi /// - /// IOLayer - documentation pending + /// Writes text to a file. /// - /// - /// + /// Path to file to write to. + /// Text to write. public static void WriteAllText(string path, string contents) { ImplementationFactory.CurrentFactory.StatelessC1File.WriteAllText(path, contents); @@ -463,11 +469,11 @@ public static void WriteAllText(string path, string contents) /// - /// IOLayer - documentation pending + /// Writes text to a file. /// - /// - /// - /// + /// Path to file to write to. + /// Text to write. + /// Encoding to use when writing. public static void WriteAllText(string path, string contents, Encoding encoding) { ImplementationFactory.CurrentFactory.StatelessC1File.WriteAllText(path, contents, encoding); @@ -476,10 +482,10 @@ public static void WriteAllText(string path, string contents, Encoding encoding) /// - /// IOLayer - documentation pending + /// Gets the file attributes. /// - /// - /// + /// Path to file to get attributes from. + /// Returns the file attributes. See System.IO.FileAttributes public static FileAttributes GetAttributes(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.GetAttributes(path); @@ -488,10 +494,10 @@ public static FileAttributes GetAttributes(string path) /// - /// IOLayer - documentation pending + /// Sets the file attributes. /// - /// - /// + /// Path to file to set attributes on. + /// File attributes to set. public static void SetAttributes(string path, FileAttributes fileAttributes) { ImplementationFactory.CurrentFactory.StatelessC1File.SetAttributes(path, fileAttributes); @@ -500,10 +506,10 @@ public static void SetAttributes(string path, FileAttributes fileAttributes) /// - /// IOLayer - documentation pending + /// Gets the creation time of the file. /// - /// - /// + /// Path to file. + /// Returns the creation time of the given file. public static DateTime GetCreationTime(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.GetCreationTime(path); @@ -512,10 +518,10 @@ public static DateTime GetCreationTime(string path) /// - /// IOLayer - documentation pending + /// Gets the creation utc time of the file. /// - /// - /// + /// Path to file. + /// Returns the creation utc time of the given file. public static DateTime GetCreationTimeUtc(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.GetCreationTimeUtc(path); @@ -524,10 +530,10 @@ public static DateTime GetCreationTimeUtc(string path) /// - /// IOLayer - documentation pending + /// Sets the creation time of the file. /// - /// - /// + /// Path to file. + /// New creation time. public static void SetCreationTime(string path, DateTime creationTime) { ImplementationFactory.CurrentFactory.StatelessC1File.SetCreationTime(path, creationTime); @@ -536,10 +542,10 @@ public static void SetCreationTime(string path, DateTime creationTime) /// - /// IOLayer - documentation pending + /// Sets the creation utc time of the file. /// - /// - /// + /// Path to file. + /// New creation utc time. public static void SetCreationTimeUtc(string path, DateTime creationTimeUtc) { ImplementationFactory.CurrentFactory.StatelessC1File.SetCreationTimeUtc(path, creationTimeUtc); @@ -548,10 +554,10 @@ public static void SetCreationTimeUtc(string path, DateTime creationTimeUtc) /// - /// IOLayer - documentation pending + /// Gets the last access time. /// - /// - /// + /// Path to file. + /// Returns the last access time of the file. public static DateTime GetLastAccessTime(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.GetLastAccessTime(path); @@ -560,10 +566,10 @@ public static DateTime GetLastAccessTime(string path) /// - /// IOLayer - documentation pending + /// Gets the last access utc time. /// - /// - /// + /// Path to file. + /// Returns the last access utc time of the file. public static DateTime GetLastAccessTimeUtc(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.GetLastAccessTimeUtc(path); @@ -572,10 +578,10 @@ public static DateTime GetLastAccessTimeUtc(string path) /// - /// IOLayer - documentation pending + /// Sets the last access time of the file. /// - /// - /// + /// Path to file. + /// New last access time. public static void SetLastAccessTime(string path, DateTime lastAccessTime) { ImplementationFactory.CurrentFactory.StatelessC1File.SetLastAccessTime(path, lastAccessTime); @@ -584,10 +590,10 @@ public static void SetLastAccessTime(string path, DateTime lastAccessTime) /// - /// IOLayer - documentation pending + /// Sets the last access utc time of the file. /// - /// - /// + /// Path to file. + /// New last access utc time. public static void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc) { ImplementationFactory.CurrentFactory.StatelessC1File.SetLastAccessTimeUtc(path, lastAccessTimeUtc); @@ -596,10 +602,10 @@ public static void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc) /// - /// IOLayer - documentation pending + /// Get last write time of the file. /// - /// - /// + /// Path to file. + /// Returns the last write time of the file. public static DateTime GetLastWriteTime(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.GetLastWriteTime(path); @@ -608,10 +614,10 @@ public static DateTime GetLastWriteTime(string path) /// - /// IOLayer - documentation pending + /// Get last write utc time of the file. /// - /// - /// + /// Path to file. + /// Returns the last write utc time of the file. public static DateTime GetLastWriteTimeUtc(string path) { return ImplementationFactory.CurrentFactory.StatelessC1File.GetLastWriteTimeUtc(path); @@ -620,10 +626,10 @@ public static DateTime GetLastWriteTimeUtc(string path) /// - /// IOLayer - documentation pending + /// Sets the last write time of the file. /// - /// - /// + /// Path to file. + /// New last write time. public static void SetLastWriteTime(string path, DateTime lastWriteTime) { ImplementationFactory.CurrentFactory.StatelessC1File.SetLastWriteTime(path, lastWriteTime); @@ -632,10 +638,10 @@ public static void SetLastWriteTime(string path, DateTime lastWriteTime) /// - /// IOLayer - documentation pending + /// Sets the last write utc time of the file. /// - /// - /// + /// Path to file. + /// New last write utc time. public static void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc) { ImplementationFactory.CurrentFactory.StatelessC1File.SetLastWriteTimeUtc(path, lastWriteTimeUtc); diff --git a/Composite/Properties/AssemblyInfo.cs b/Composite/Properties/AssemblyInfo.cs index 5f803d7a9e..2d793b7050 100644 --- a/Composite/Properties/AssemblyInfo.cs +++ b/Composite/Properties/AssemblyInfo.cs @@ -6,7 +6,7 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Composite C1 2.1 RC")] +[assembly: AssemblyTitle("Composite C1 2.1")] [assembly: AssemblyDescription("Composite C1 Core classes")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Composite A/S")]