Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ***********************************************************************
- // Author : Elektro
- // Last Modified On : 28-May-2015
- // ***********************************************************************
- // <copyright file="FileSplitter.vb" company="Elektro Studios">
- // Copyright (c) Elektro Studios. All rights reserved.
- // </copyright>
- // ***********************************************************************
- #region " Usage Examples "
- // Contenido omitido ...
- #endregion
- #region " Usings "
- using System.ComponentModel;
- using System.IO;
- using Microsoft.VisualBasic;
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Data;
- using System.Diagnostics;
- #endregion
- /// <summary>
- /// Splits a file into manageable chunks, or merge the splitted chunks.
- /// With progress-percent features.
- /// </summary>
- public sealed class FileSplitter
- {
- #region " Properties "
- /// <summary>
- /// Gets or sets the buffer-size used to split or merge, in Bytes.
- /// Default value is: 524288 bytes (512 Kb).
- /// </summary>
- /// <value>The buffer-size.</value>
- public int BufferSize { get; set; }
- // 4096 Bytes ( 4 Kb) This is the default Microsoft's FileStream implementation buffer size.
- // 8192 Bytes ( 8 Kb)
- // 16384 Bytes ( 16 Kb)
- // 32768 Bytes ( 32 Kb)
- // 65536 Bytes ( 64 Kb)
- // 131072 Bytes (128 Kb)
- // 262144 Bytes (256 Kb)
- // 524288 Bytes (512 Kb)
- // 1048576 Bytes ( 1 Mb)
- #endregion
- #region " Events "
- #region " Event Declarations "
- /// <summary>
- /// Occurs when the progress changes when splitting a file.
- /// </summary>
- public event EventHandler<SplitProgressChangedArgs> SplitProgressChanged;
- /// <summary>
- /// Occurs when the progress changes when merging a file.
- /// </summary>
- public event EventHandler<MergeProgressChangedArgs> MergeProgressChanged;
- #endregion
- #region " Event Data "
- #region " SplitProgressChanged "
- /// <summary>
- /// Contains the event data of the <see cref="FileSplitter.SplitProgressChanged"/> event.
- /// </summary>
- public sealed class SplitProgressChangedArgs : EventArgs
- {
- #region " Properties "
- /// <summary>
- /// Gets the total progress value.
- /// (From 0 to 100)
- /// </summary>
- /// <value>The total progress value.</value>
- public double TotalProgress {
- get { return this.totalProgress1; }
- }
- /// <summary>
- /// The total progress value.
- /// (From 0 to 100)
- /// </summary>
- private readonly double totalProgress1;
- /// <summary>
- /// Gets the current chunk progress value.
- /// (From 0 to 100)
- /// </summary>
- /// <value>The current chunk progress value.</value>
- public double ChunkProgress {
- get { return this.chunkProgress1; }
- }
- /// <summary>
- /// The current chunk progress value.
- /// (From 0 to 100)
- /// </summary>
- private readonly double chunkProgress1;
- /// <summary>
- /// Gets the amount of chunks to create.
- /// </summary>
- /// <value>The amount of chunks to create.</value>
- public long ChunksToCreate {
- get { return this.chunksToCreate1; }
- }
- /// <summary>
- /// The amount of chunks to create.
- /// </summary>
- private readonly long chunksToCreate1;
- /// <summary>
- /// Gets the amount of created chunks.
- /// </summary>
- /// <value>The amount of created chunks.</value>
- public long ChunksCreated {
- get { return this.chunksCreated1; }
- }
- /// <summary>
- /// The amount of created chunks.
- /// </summary>
- private readonly long chunksCreated1;
- #endregion
- #region " Ctors "
- /// <summary>
- /// Prevents a default instance of the <see cref="FileSplitter.SplitProgressChangedArgs"/> class from being created.
- /// </summary>
- private SplitProgressChangedArgs()
- {}
- /// <summary>
- /// Initializes a new instance of the <see cref="FileSplitter.SplitProgressChangedArgs"/> class.
- /// </summary>
- /// <param name="totalProgress">The total progress value.</param>
- /// <param name="chunkProgress">The current chunk progress value.</param>
- /// <param name="chunksToCreate">The amount of chunks to create.</param>
- /// <param name="chunksCreated">The amount of created chunks.</param>
- public SplitProgressChangedArgs(double totalProgress, double chunkProgress, long chunksToCreate, long chunksCreated)
- {
- this.totalProgress1 = totalProgress;
- this.chunkProgress1 = chunkProgress;
- this.chunksToCreate1 = chunksToCreate;
- this.chunksCreated1 = chunksCreated;
- }
- #endregion
- #region " Hidden Methods "
- /// <summary>
- /// Serves as a hash function for a particular type.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new int GetHashCode()
- {
- return base.GetHashCode;
- }
- /// <summary>
- /// Gets the System.Type of the current instance.
- /// </summary>
- /// <returns>The exact runtime type of the current instance.</returns>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new Type GetType()
- {
- return base.GetType;
- }
- /// <summary>
- /// Determines whether the specified System.Object instances are considered equal.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new bool Equals(object obj)
- {
- return base.Equals(obj);
- }
- /// <summary>
- /// Determines whether the specified System.Object instances are the same instance.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- private new bool ReferenceEquals(object objA, object objB)
- {
- return null;
- }
- /// <summary>
- /// Returns a String that represents the current object.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new string ToString()
- {
- return base.ToString;
- }
- #endregion
- }
- #endregion
- #region " MergeProgressChangedArgs "
- /// <summary>
- /// Contains the event data of the <see cref="FileSplitter.MergeProgressChanged"/> event.
- /// </summary>
- public sealed class MergeProgressChangedArgs : EventArgs
- {
- #region " Properties "
- /// <summary>
- /// Gets the total progress value.
- /// (From 0 to 100)
- /// </summary>
- /// <value>The total progress value.</value>
- public double TotalProgress {
- get { return this.totalProgress1; }
- }
- /// <summary>
- /// The total progress value.
- /// (From 0 to 100)
- /// </summary>
- private readonly double totalProgress1;
- /// <summary>
- /// Gets the current chunk progress value.
- /// (From 0 to 100)
- /// </summary>
- /// <value>The current chunk progress value.</value>
- public double ChunkProgress {
- get { return this.chunkProgress1; }
- }
- /// <summary>
- /// The current chunk progress value.
- /// (From 0 to 100)
- /// </summary>
- private readonly double chunkProgress1;
- /// <summary>
- /// Gets the amount of chunks to merge.
- /// </summary>
- /// <value>The amount of chunks to merge.</value>
- public long ChunksToMerge {
- get { return this.chunksToMerge1; }
- }
- /// <summary>
- /// The amount of chunks to merge.
- /// </summary>
- private readonly long chunksToMerge1;
- /// <summary>
- /// Gets the amount of merged chunks.
- /// </summary>
- /// <value>The amount of merged chunks.</value>
- public long ChunksMerged {
- get { return this.chunksMerged1; }
- }
- /// <summary>
- /// The amount of merged chunks.
- /// </summary>
- private readonly long chunksMerged1;
- #endregion
- #region " Constructors "
- /// <summary>
- /// Prevents a default instance of the <see cref="FileSplitter.MergeProgressChangedArgs"/> class from being created.
- /// </summary>
- private MergeProgressChangedArgs()
- {}
- /// <summary>
- /// Initializes a new instance of the <see cref="FileSplitter.MergeProgressChangedArgs"/> class.
- /// </summary>
- /// <param name="totalProgress">The total progress value.</param>
- /// <param name="chunkProgress">The current chunk progress value.</param>
- /// <param name="chunksToMerge">The amount of chunks to merge.</param>
- /// <param name="chunksMerged">The amount of merged chunks.</param>
- public MergeProgressChangedArgs(double totalProgress, double chunkProgress, long chunksToMerge, long chunksMerged)
- {
- this.totalProgress1 = totalProgress;
- this.chunkProgress1 = chunkProgress;
- this.chunksToMerge1 = chunksToMerge;
- this.chunksMerged1 = chunksMerged;
- }
- #endregion
- #region " Hidden Methods "
- /// <summary>
- /// Serves as a hash function for a particular type.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new int GetHashCode()
- {
- return base.GetHashCode;
- }
- /// <summary>
- /// Gets the System.Type of the current instance.
- /// </summary>
- /// <returns>The exact runtime type of the current instance.</returns>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new Type GetType()
- {
- return base.GetType;
- }
- /// <summary>
- /// Determines whether the specified System.Object instances are considered equal.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new bool Equals(object obj)
- {
- return base.Equals(obj);
- }
- /// <summary>
- /// Determines whether the specified System.Object instances are the same instance.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- private new bool ReferenceEquals(object objA, object objB)
- {
- return null;
- }
- /// <summary>
- /// Returns a String that represents the current object.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new string ToString()
- {
- return base.ToString;
- }
- #endregion
- }
- #endregion
- #endregion
- #endregion
- #region " Public Methods "
- /// <summary>
- /// Splits a file into manageable chunks.
- /// </summary>
- /// <param name="sourceFile">The file to split.</param>
- /// <param name="chunkCount">The amount of chunks.</param>
- /// <param name="chunkName">The name formatting for chunks.</param>
- /// <param name="chunkExt">The file-extension for chunks.</param>
- /// <param name="overwrite">If set to <c>True</c>, any existing file will be overwritten if needed to create a chunk, otherwise, an exception will be thrown.</param>
- /// <param name="deleteAfterSplit">If set to <c>True</c>, the input file will be deleted after a successful split operation.</param>
- /// <exception cref="System.Exception"></exception>
- public void Split(string sourceFile,
- int chunkCount,
- string chunkName = null,
- string chunkExt = null,
- bool overwrite = false,
- bool deleteAfterSplit = false)
- {
- long chunkSize = 0;
- try {
- chunkSize = Convert.ToInt64(Math.Ceiling(new FileInfo(sourceFile).Length / chunkCount));
- } catch (Exception ex) {
- throw;
- }
- this.Split(sourceFile: sourceFile,
- chunkSize: chunkSize,
- chunkName: chunkName,
- chunkExt: chunkExt,
- overwrite: overwrite,
- deleteAfterSplit: deleteAfterSplit);
- }
- /// <summary>
- /// Splits a file into manageable chunks.
- /// </summary>
- /// <param name="sourceFile">The file to split.</param>
- /// <param name="chunkSize">The size per chunk.</param>
- /// <param name="chunkName">The name formatting for chunks.</param>
- /// <param name="chunkExt">The file-extension for chunks.</param>
- /// <param name="overwrite">If set to <c>True</c>, any existing file will be overwritten if needed to create a chunk, otherwise, an exception will be thrown.</param>
- /// <param name="deleteAfterSplit">If set to <c>True</c>, the input file will be deleted after a successful split operation.</param>
- /// <exception cref="System.IO.FileNotFoundException">The specified source file doesn't exists.</exception>
- /// <exception cref="System.IO.IOException">File already exists.</exception>
- /// <exception cref="System.OverflowException">'chunkSize' value should be smaller than the source filesize.</exception>
- public void Split(string sourceFile,
- long chunkSize,
- string chunkName = null,
- string chunkExt = null,
- bool overwrite = false,
- bool deleteAfterSplit = false)
- {
- if (!File.Exists(sourceFile)) {
- throw new FileNotFoundException("The specified source file doesn't exists.", sourceFile);
- return;
- }
- // The progress event arguments.
- SplitProgressChangedArgs progressArguments = null;
- // FileInfo instance of the source file.
- FileInfo fInfo = new FileInfo(sourceFile);
- // The total filesize to split, in bytes.
- long totalSize = fInfo.Length;
- // The remaining size to calculate the percentage, in bytes.
- long sizeRemaining = totalSize;
- // Counts the length of the current chunk file to calculate the percentage, in bytes.
- long sizeWritten = 0;
- // The buffer to read data and write the chunks.
- byte[] buffer = null;
- // The buffer length.
- int bufferLength = 0;
- // The total amount of chunks to create.
- long chunkCount = Convert.ToInt64(Math.Ceiling((fInfo.Length) / (chunkSize)));
- // Keeps track of the current chunk.
- long chunkIndex = 0;
- // Keeps track of the amount of buffer-writting operations.
- int writeCounts = 0;
- // Keeps track of the current buffer-writting operation.
- int writeCount = 0;
- // Keeps track of the total percentage done.
- double totalProgress = 0;
- // Keeps track of the current chunk percentage done.
- double chunkProgress = 0;
- // A zero-filled string to enumerate the chunk parts.
- string fileEnumeration = null;
- // The chunks filename.
- string chunkFilename = null;
- // The chunks basename.
- chunkName = string.IsNullOrEmpty(chunkName) ? Path.Combine(fInfo.DirectoryName, Path.GetFileNameWithoutExtension(fInfo.Name)) : Path.Combine(fInfo.DirectoryName, chunkName);
- // The chunks file extension.
- chunkExt = string.IsNullOrEmpty(chunkExt) ? fInfo.Extension.Substring(1) : chunkExt;
- // chunk size is bigger than source-file size.
- if (chunkSize >= fInfo.Length) {
- throw new OverflowException("'chunkSize' value should be smaller than the source filesize.");
- return;
- // chunk size is smaller than buffer size.
- } else if (chunkSize < this.BufferSize) {
- bufferLength = Convert.ToInt32(chunkSize);
- // chunk size is bigger than buffer size.
- } else {
- bufferLength = this.BufferSize;
- }
- // If not file overwriting is allowed then...
- if (!overwrite) {
- // Start index based on 1 (eg. "File.Part.1.ext").
- for (long index = 1L; index <= chunkCount; index++) {
- // Set chunk filename.
- fileEnumeration = new string('0', Convert.ToString(chunkCount).Length - Convert.ToString(index).Length);
- chunkFilename = string.Format("{0}.{1}.{2}", chunkName, fileEnumeration + Convert.ToString(index), chunkExt);
- // If chunk file already exists then...
- if (File.Exists(chunkFilename)) {
- throw new IOException(string.Format("File already exists: {0}", chunkFilename));
- return;
- }
- }
- }
- // overwrite
- // Open the file to start reading bytes.
- using (FileStream inputStream = new FileStream(fInfo.FullName, FileMode.Open)) {
- using (BinaryReader binaryReader = new BinaryReader(inputStream)) {
- while ((inputStream.Position < inputStream.Length)) {
- // Increment the chunk file counter.
- chunkIndex += 1L;
- // Set chunk filename.
- fileEnumeration = new string('0', Convert.ToString(chunkCount).Length - Convert.ToString(chunkIndex).Length);
- chunkFilename = string.Format("{0}.{1}.{2}", chunkName, fileEnumeration + Convert.ToString(chunkIndex), chunkExt);
- // Reset written byte-length counter.
- sizeWritten = 0L;
- // Create the chunk file to Write the bytes.
- using (FileStream outputStream = new FileStream(chunkFilename, FileMode.Create)) {
- // Calculate the amount of buffer-writting operations.
- writeCounts = Convert.ToInt32(Math.Ceiling(chunkSize / bufferLength));
- writeCount = 0;
- // Read until reached the end-bytes of the input file.
- while ((inputStream.Position < inputStream.Length) && (sizeWritten < chunkSize)) {
- // Increment the buffer-writting counter.
- writeCount += 1;
- // If buffer-writting operation is the last buffer-writting operation then...
- if ((writeCount == writeCounts)) {
- // Fix buffer size for writting the last buffer-data.
- bufferLength = Convert.ToInt32(chunkSize - sizeWritten);
- }
- // Read bytes from the input file).
- buffer = binaryReader.ReadBytes(bufferLength);
- // Write those bytes in the chunk file.
- outputStream.Write(buffer, 0, buffer.Length);
- // Increment the bytes-written counter.
- sizeWritten += buffer.Length;
- // Decrease the bytes-remaining counter.
- sizeRemaining -= buffer.Length;
- // Set the total progress.
- totalProgress = (totalSize - sizeRemaining) * (100 / totalSize);
- // Set the current chunk progress.
- chunkProgress = !(chunkIndex == chunkCount) ? (100 / chunkSize) * (sizeWritten - bufferLength) : (100 / (inputStream.Length - (chunkSize * (chunkIndex - 1)))) * (sizeWritten - bufferLength);
- // Set the progress event data.
- progressArguments = new SplitProgressChangedArgs(TotalProgress: !(totalProgress > 99.9) ? totalProgress : 99.9, ChunkProgress: chunkProgress, ChunksToCreate: chunkCount, ChunksCreated: chunkIndex - 1L);
- // Trigger the progress event.
- if (SplitProgressChanged != null) {
- SplitProgressChanged(this, progressArguments);
- }
- }
- // (inputStream.Position < inputStream.Length) AndAlso (sizeWritten < chunkSize)
- outputStream.Flush();
- }
- // outputStream
- }
- // (inputStream.Position < inputStream.Length)
- }
- // binaryReader
- }
- // inputStream
- // Set the ending progress event data.
- progressArguments = new SplitProgressChangedArgs(TotalProgress: 100.0, ChunkProgress: 100.0, ChunksToCreate: chunkCount, ChunksCreated: chunkIndex - 1L);
- // Trigger the last progress event.
- if (SplitProgressChanged != null) {
- SplitProgressChanged(this, progressArguments);
- }
- }
- /// <summary>
- /// Merges the chunks of a previously splitted file.
- /// </summary>
- /// <param name="sourceChunk">The initial chunk of a splitted file. (eg: 'C:\File.Part.01.avi')</param>
- /// <param name="targetFile">The target filepath.</param>
- /// <param name="overwrite">
- /// If set to <c>true</c>, in case that the specified file in <paramref name="targetFile"/> exists it will be overwritten,
- /// otherwise, an exception will be thrown.
- /// </param>
- /// <param name="deleteChunksAfterMerged">If set to <c>true</c>, the chunks will be deleted after a successful merge operation.</param>
- /// <exception cref="System.IO.FileNotFoundException">The specified chunk file doesn't exists.</exception>
- /// <exception cref="System.IO.FileNotFoundException">Only one chunk file found, the last chunk file is missing.</exception>
- /// <exception cref="System.IO.IOException">The specified target file already exists.</exception>
- /// <exception cref="System.OverflowException">"Unexpected chunk filesize-count detected, maybe one of the chunk files is corrupt?.".</exception>
- public void Merge(string sourceChunk, string targetFile = null, bool overwrite = false, bool deleteChunksAfterMerged = false)
- {
- if (!File.Exists(sourceChunk)) {
- throw new FileNotFoundException("The specified chunk file doesn't exists.", sourceChunk);
- return;
- } else if (!overwrite && File.Exists(targetFile)) {
- throw new IOException(string.Format("The specified target file already exists: {0}", targetFile));
- return;
- }
- // The progress event arguments.
- MergeProgressChangedArgs progressArguments = null;
- // FileInfo instance of the source chunk file.
- FileInfo fInfo = new FileInfo(sourceChunk);
- // Get the source chunk filename without extension.
- string filename = Path.GetFileNameWithoutExtension(fInfo.FullName);
- // Remove the chunk enumeration from the filename.
- filename = filename.Substring(0, filename.LastIndexOf('.'));
- // Set the enumeration pattern to find the chunk files to merge.
- string chunkPatternSearch = filename + ".*" + !string.IsNullOrEmpty(fInfo.Extension) ? fInfo.Extension : "";
- // Retrieve all the chunk files to merge.
- IEnumerable<FileInfo> chunks = from chunk in Directory.EnumerateFiles(fInfo.DirectoryName, chunkPatternSearch, SearchOption.TopDirectoryOnly)new FileInfo(chunk);
- // If chunk files are less than two then...
- if (chunks.LongCount < 2L) {
- throw new FileNotFoundException("Only one chunk file found, the last chunk file is missing.");
- return;
- }
- // The total filesize to merge, in bytes.
- long totalSize = (from Chunk in chunkschunk.Length).Sum;
- // Gets the filesize of the chunk files and the last chunk file, in bytes.
- long[] chunkSizes = (from Chunk in chunkschunk.Lengthorderby Length descending).Distinct.ToArray;
- // If chunk sizes are more than 2...
- if (chunkSizes.LongCount > 2L) {
- throw new OverflowException("Unexpected chunk filesize-count detected, maybe one of the chunk files is corrupt?.");
- return;
- }
- // The remaining size to calculate the percentage, in bytes.
- long sizeRemaining = totalSize;
- // Counts the length of the current chunk file to calculate the percentage, in bytes.
- long sizeWritten = 0;
- // Counts the length of the written size on the current chunk file, in bytes.
- long chunkSizeWritten = 0;
- // The buffer to read data and merge the chunks.
- byte[] buffer = null;
- // The buffer length.
- int bufferLength = this.BufferSize;
- // The total amount of chunks to merge.
- long chunkCount = chunks.LongCount;
- // Keeps track of the current chunk.
- long chunkIndex = 0;
- // Keeps track of the total percentage done.
- double totalProgress = 0;
- // Create the output file to merge the chunks inside.
- using (FileStream outputStream = new FileStream(targetFile, FileMode.Create)) {
- // Iterate the chunk files.
- foreach (FileInfo chunk in chunks) {
- // Open the chunk file to start reading bytes.
- using (FileStream inputStream = new FileStream(chunk.FullName, FileMode.Open)) {
- using (BinaryReader binaryReader = new BinaryReader(inputStream)) {
- // Read until reached the end-bytes of the chunk file.
- while ((inputStream.Position < inputStream.Length)) {
- // Read bytes from the chunk file (BufferSize byte-length).
- buffer = binaryReader.ReadBytes(bufferLength);
- // Write those bytes in the output file.
- outputStream.Write(buffer, 0, buffer.Length);
- // Increment the bytes-written counters.
- sizeWritten += buffer.Length;
- chunkSizeWritten += buffer.Length;
- // Decrease the bytes-remaining counter.
- sizeRemaining -= buffer.Length;
- // Set the total progress.
- totalProgress = (totalSize - sizeRemaining) * (100 / totalSize);
- // Set the progress event data.
- progressArguments = new MergeProgressChangedArgs(TotalProgress: !(totalProgress > 99.9) ? totalProgress : 99.9, ChunkProgress: (100 / inputStream.Length) * (chunkSizeWritten - bufferLength), ChunksToMerge: chunkCount, ChunksMerged: chunkIndex);
- // Trigger the progress event.
- if (MergeProgressChanged != null) {
- MergeProgressChanged(this, progressArguments);
- }
- }
- // (inputStream.Position < inputStream.Length)
- chunkIndex += 1;
- // Increment the chunk file counter.
- chunkSizeWritten = 0L;
- // Reset the bytes-written for the next chunk.
- }
- // binaryReader
- }
- // inputStream
- }
- outputStream.Flush();
- }
- // outputStream
- // Set the ending progress event data.
- progressArguments = new MergeProgressChangedArgs(TotalProgress: 100.0, ChunkProgress: 100.0, ChunksToMerge: chunkCount, ChunksMerged: chunkIndex - 1L);
- // Trigger the last progress event.
- if (MergeProgressChanged != null) {
- MergeProgressChanged(this, progressArguments);
- }
- // Delethe the chunk files.
- if (deleteChunksAfterMerged) {
- foreach (FileInfo chunk in chunks) {
- File.Delete(chunk.FullName);
- }
- }
- // deleteChunksAfterMerged
- }
- #endregion
- #region " Hidden Methods "
- /// <summary>
- /// Serves as a hash function for a particular type.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new int GetHashCode()
- {
- return base.GetHashCode;
- }
- /// <summary>
- /// Gets the System.Type of the current instance.
- /// </summary>
- /// <returns>The exact runtime type of the current instance.</returns>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new Type GetType()
- {
- return base.GetType;
- }
- /// <summary>
- /// Determines whether the specified System.Object instances are considered equal.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new bool Equals(object obj)
- {
- return base.Equals(obj);
- }
- /// <summary>
- /// Determines whether the specified System.Object instances are the same instance.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- private new bool ReferenceEquals(object objA, object objB)
- {
- return null;
- }
- /// <summary>
- /// Returns a String that represents the current object.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public new string ToString()
- {
- return base.ToString;
- }
- #endregion
- }
- //=======================================================
- //Service provided by Telerik (www.telerik.com)
- //=======================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement