Cosmos/source2/Kernel/System/Cosmos.System/Filesystem/Listing/Base.cs
blah38621_cp 1b922726f0 The first of a series of commits as I work my way down the list of things Gendarme found wrong. (a large amount is likely to be skipped, as gendarme found 13k potential issues.)
This one makes sure that constructors for abstract classes are protected, not public, as the constructor can only be called by child classes.
2011-10-22 23:19:51 +00:00

23 lines
No EOL
587 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.System.Filesystem.Listing {
public abstract class Base {
public readonly FileSystem FileSystem;
public readonly string Name;
protected Base(FileSystem aFileSystem, string aName) {
FileSystem = aFileSystem;
Name = aName;
}
// Size might be updated in an ancestor destructor or on demand,
// so its not a readonly field
protected UInt64 mSize;
public virtual UInt64 Size {
get { return mSize; }
}
}
}