InitializeDefaultDrives() { var type = typeof(T); var attr = (from DriveInfoAttribute a in type.GetCustomAttributes(typeof(DriveInfoAttribute), true) select a ).FirstOrDefault(); if (null == attr) { throw new InvalidOperationException("DriveInfoAttribute is not available on the specified model"); } var drive = new Drive <T>(new PSDriveInfo(attr.DriveName, this.ProviderInfo, attr.ProviderDriveRoot, attr.ProviderDescription, null)); return(new Collection <PSDriveInfo> { drive }); }
public RootNodeFactory(Drive <T> drive, string name) { _drive = drive; _name = name; }
public RootNodeFactory(Drive <T> drive) : this(drive, drive.RootNodeName) { }