public override void InitializeComInterfaces() { base.InitializeComInterfaces(); if (this.drive == null) { try { this.drive = (IVdsDrive)base.ComUnknown; } catch (InvalidCastException exception) { throw new VdsException("QueryInterface for IVdsDrive failed.", exception); } } if (this.maintenance == null) { try { this.maintenance = (IVdsMaintenance)base.ComUnknown; } catch (InvalidCastException) { } } }
public SubSystem() { this.refresh = true; this.subSystem = null; this.maintenance = null; this.subSystemIscsi = null; }
public override void InitializeComInterfaces() { base.InitializeComInterfaces(); if (this.lun == null) { this.lun = InteropHelpers.QueryInterface <IVdsLun>(base.ComUnknown); if (this.lun == null) { throw new VdsException("QueryInterface for IVdsLun failed."); } } if (this.lunNaming == null) { this.lunNaming = InteropHelpers.QueryInterface <IVdsLunNaming>(base.ComUnknown); } if (this.lunMpio == null) { this.lunMpio = InteropHelpers.QueryInterface <IVdsLunMpio>(base.ComUnknown); } if (this.lunControllerPorts == null) { this.lunControllerPorts = InteropHelpers.QueryInterface <IVdsLunControllerPorts>(base.ComUnknown); } if (this.lunIscsi == null) { this.lunIscsi = InteropHelpers.QueryInterface <IVdsLunIscsi>(base.ComUnknown); } if (this.maintenance == null) { this.maintenance = InteropHelpers.QueryInterface <IVdsMaintenance>(base.ComUnknown); } if (this.lunNumber == null) { this.lunNumber = InteropHelpers.QueryInterface <IVdsLunNumber>(base.ComUnknown); } }
public override void InitializeComInterfaces() { base.InitializeComInterfaces(); if (this.subSystem == null) { this.subSystem = InteropHelpers.QueryInterface <IVdsSubSystem>(base.ComUnknown); if (this.subSystem == null) { throw new VdsException("QueryInterface for IVdsSubSystem failed."); } } if (this.subSystem2 == null) { this.subSystem2 = InteropHelpers.QueryInterface <IVdsSubSystem2>(base.ComUnknown); } if (this.maintenance == null) { this.maintenance = InteropHelpers.QueryInterface <IVdsMaintenance>(base.ComUnknown); } if (this.subSystemIscsi == null) { this.subSystemIscsi = InteropHelpers.QueryInterface <IVdsSubSystemIscsi>(base.ComUnknown); } if (this.importTarget == null) { this.importTarget = InteropHelpers.QueryInterface <IVdsSubSystemImportTarget>(base.ComUnknown); } if (this.subSystemNaming == null) { this.subSystemNaming = InteropHelpers.QueryInterface <IVdsSubSystemNaming>(base.ComUnknown); } if (this.subSystemInterconnect == null) { this.subSystemInterconnect = InteropHelpers.QueryInterface <IVdsSubSystemInterconnect>(base.ComUnknown); } }