本文整理汇总了C#中IXenObject类的典型用法代码示例。如果您正苦于以下问题:C# IXenObject类的具体用法?C# IXenObject怎么用?C# IXenObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IXenObject类属于命名空间,在下文中一共展示了IXenObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ImportWizard
public ImportWizard(IXenConnection con, IXenObject xenObject, string filename, bool ovfModeOnly)
: base(con)
{
InitializeComponent();
m_pageStorage = new ImportSelectStoragePage();
m_pageNetwork = new ImportSelectNetworkPage();
m_pageHost = new ImportSelectHostPage();
m_pageSecurity = new ImportSecurityPage();
m_pageEula = new ImportEulaPage();
m_pageOptions = new ImportOptionsPage();
m_pageFinish = new ImportFinishPage();
m_pageRbac = new RBACWarningPage();
m_pageTvmIp = new TvmIpPage();
m_pageVMconfig = new ImageVMConfigPage();
m_pageImportSource = new ImportSourcePage();
m_pageXvaStorage = new StoragePickerPage();
m_pageXvaNetwork = new NetworkPickerPage();
m_pageXvaHost = new GlobalSelectHost();
lunPerVdiMappingPage = new LunPerVdiImportPage { Connection = con };
m_selectedObject = xenObject;
m_pageTvmIp.IsExportMode = false;
m_pageFinish.SummaryRetreiver = GetSummary;
m_pageXvaStorage.ImportVmCompleted += m_pageXvaStorage_ImportVmCompleted;
if (!string.IsNullOrEmpty(filename))
m_pageImportSource.SetFileName(filename);
m_pageImportSource.OvfModeOnly = ovfModeOnly;
AddPages(m_pageImportSource, m_pageHost, m_pageStorage, m_pageNetwork, m_pageFinish);
}
开发者ID:huizh,项目名称:xenadmin,代码行数:32,代码来源:ImportWizard.cs
示例2: SaveDataSourceStateAction
public SaveDataSourceStateAction(IXenConnection connection, IXenObject xmo, List<DataSourceItem> items, List<DesignedGraph> graphs)
: base(connection, Messages.ACTION_SAVE_DATASOURCES, Messages.ACTION_SAVING_DATASOURCES, true)
{
DataSourceItems = items;
XenObject = xmo;
Graphs = graphs;
}
开发者ID:ReSalles,项目名称:xenadmin,代码行数:7,代码来源:SaveDataSourceStateAction.cs
示例3: WlbEnabledFilter
public WlbEnabledFilter(IXenObject item, List<VM> preSelectedVMs)
: base(item)
{
if (preSelectedVMs == null)
throw new ArgumentNullException("Pre-selected VMs are null");
this.preSelectedVMs = preSelectedVMs;
}
开发者ID:ushamandya,项目名称:xenadmin,代码行数:7,代码来源:WlbEnabledFilter.cs
示例4: ResidentHostIsSameAsSelectionFilter
public ResidentHostIsSameAsSelectionFilter(IXenObject item, List<VM> preSelectedVMs)
: base(item)
{
if (preSelectedVMs == null)
throw new ArgumentNullException("Pre-selected VMs are null");
this.preSelectedVMs = preSelectedVMs;
}
开发者ID:ushamandya,项目名称:xenadmin,代码行数:7,代码来源:ResidentHostIsSameAsSelectionFilter.cs
示例5: SelectedItem
/// <summary>
/// Initializes a new instance of the <see cref="SelectedItem"/> class.
/// </summary>
/// <param name="xenObject">The xen object that is selected.</param>
/// <param name="connection">The connection of the xen object.</param>
/// <param name="hostAncestor">The host ancestor of the xen object in the tree.</param>
/// <param name="poolAncestor">The pool ancestor of the xen object in the tree.</param>
public SelectedItem(IXenObject xenObject, IXenConnection connection, Host hostAncestor, Pool poolAncestor)
{
_xenObject = xenObject;
_hostAncestor = hostAncestor;
_poolAncestor = poolAncestor;
_connection = connection;
}
开发者ID:huizh,项目名称:xenadmin,代码行数:14,代码来源:SelectedItem.cs
示例6: SaveDataSourceStateAction
public SaveDataSourceStateAction(IXenConnection connection, IXenObject xmo, List<DataSourceItem> items, List<DesignedGraph> graphs)
: base(connection, "Saving DataSources", "Saving DataSources", true)
{
DataSourceItems = items;
XenObject = xmo;
Graphs = graphs;
}
开发者ID:ChrisH4rding,项目名称:xenadmin,代码行数:7,代码来源:SaveDataSourceStateAction.cs
示例7: ReasoningFilter
protected ReasoningFilter(IXenObject itemToFilterOn)
{
if (!(itemToFilterOn is Host) && !(itemToFilterOn is Pool))
throw new ArgumentException("Target should be host or pool");
ItemToFilterOn = itemToFilterOn;
}
开发者ID:ushamandya,项目名称:xenadmin,代码行数:7,代码来源:ReasoningFilter.cs
示例8: SaveChangesAction
protected SaveChangesAction(IXenObject obj, bool suppressHistory)
: base(obj.Connection, Messages.ACTION_SAVE_CHANGES_TITLE, Messages.ACTION_SAVE_CHANGES_IN_PROGRESS, suppressHistory)
{
// This is lovely. We need to lock the server object (not the copy we have taken) before calling save changes.
// We don't know the type so we use the MethodInfo object and MakeGenericMethod to do a resolve against the type
// we have extracted from GetType(). The Resolve() call itself needs a XenRef which we make by calling the XenRef constructor that takes the
// opaque ref as an argument and using the MakeGenericType call to give it the same type as the object...
// ... _then_ we lock it.
SetObject(obj);
_xenObject = obj;
if (obj.opaque_ref != null) // creating a new object comes through here, but with obj.opaque_ref == null
{
System.Reflection.MethodInfo mi = typeof(IXenConnection).GetMethod("Resolve", BindingFlags.Public | BindingFlags.Instance);
Type type = obj.GetType();
object[] xenRefParam = new object[] {
typeof(XenRef<>).MakeGenericType(type).GetConstructor(new Type[] {typeof(string)}).Invoke(new Object[] {obj.opaque_ref})
};
_serverXenObject = (IXenObject)mi.MakeGenericMethod(type).Invoke(obj.Connection, xenRefParam);
if (_serverXenObject != null)
{
// CA-35210: Removed this exception pending locking overhaul post MR in CA-38966
//if (_serverXenObject.Locked)
// lockViolation = true;
_serverXenObject.Locked = true;
}
}
}
开发者ID:huizh,项目名称:xenadmin,代码行数:28,代码来源:SaveChangesAction.cs
示例9: LiveMigrateOptionsVmMapping
public LiveMigrateOptionsVmMapping(VmMapping vmMapping, IXenObject vm)
{
this.vmMapping = vmMapping;
this.vm = vm as VM;
if(vm==null)
throw new NullReferenceException("VM passed to ctor was null");
}
开发者ID:huizh,项目名称:xenadmin,代码行数:8,代码来源:LiveMigrateOptionsVmMapping.cs
示例10: Execute
protected virtual void Execute(IXenObject xenObject)
{
using (PropertiesDialog dialog = new PropertiesDialog(xenObject))
{
dialog.EditName();
dialog.ShowDialog(Parent);
}
}
开发者ID:huizh,项目名称:xenadmin,代码行数:8,代码来源:PropertiesCommands.cs
示例11: SaveCustomFieldsAction
public SaveCustomFieldsAction(IXenObject xenObject, List<CustomField> customFields, bool suppressHistory)
: base(xenObject.Connection, Messages.ACTION_SAVE_CUSTOM_FIELDS, string.Format(Messages.ACTION_SAVING_CUSTOM_FIELDS_FOR, xenObject), suppressHistory)
{
this.xenObject = xenObject;
this.customFields = customFields;
string type = xenObject.GetType().Name.ToLowerInvariant();
}
开发者ID:haxard,项目名称:xenadmin,代码行数:8,代码来源:SaveCustomFieldsAction.cs
示例12: SetXenObjects
public void SetXenObjects(IXenObject orig, IXenObject clone)
{
if (!(clone is VDI))
return;
vdi = clone as VDI;
Repopulate();
}
开发者ID:robhoes,项目名称:xenadmin,代码行数:8,代码来源:VDISizeLocationPage.cs
示例13: Execute
protected override void Execute(IXenObject xenObject)
{
using (PropertiesDialog dialog = new PropertiesDialog(xenObject))
{
dialog.EditDescription();
dialog.ShowDialog(Parent);
}
}
开发者ID:kc284,项目名称:xenadmin,代码行数:8,代码来源:PropertiesCommands.cs
示例14: CreateDiskAction
public CreateDiskAction(IXenObject obj)
: base(obj)
{
VDI disk = obj as VDI;
if (disk != null)
Title = string.Format(Messages.ACTION_VDI_CREATING_TITLE, disk.Name,
disk.Connection.Resolve<SR>(disk.SR).NameWithoutHost);
Description = Messages.ACTION_VDI_CREATING;
}
开发者ID:huizh,项目名称:xenadmin,代码行数:9,代码来源:CreateDiskAction.cs
示例15: GpuRow
public GpuRow(IXenObject xenObject, List<PGPU> pGpuList)
: this()
{
this.xenObject = xenObject;
pGpuLabel.Text = pGpuList[0].Name;
RepopulateAllowedTypes(pGpuList[0]);
Rebuild(pGpuList);
SetupPage();
}
开发者ID:BATYD-Turksat,项目名称:xenadmin,代码行数:9,代码来源:GpuRow.cs
示例16: CrossPoolMigrateCanMigrateFilter
public CrossPoolMigrateCanMigrateFilter(IXenObject itemAddedToComboBox, List<VM> preSelectedVMs, WizardMode wizardMode)
: base(itemAddedToComboBox)
{
_wizardMode = wizardMode;
if (preSelectedVMs == null)
throw new ArgumentNullException("Pre-selected VMs are null");
this.preSelectedVMs = preSelectedVMs;
}
开发者ID:ushamandya,项目名称:xenadmin,代码行数:9,代码来源:CrossPoolMigrateCanMigrateFilter.cs
示例17: AddTag
public static void AddTag(Session session, IXenObject o, String tag)
{
//Program.AssertOffEventThread();
String[] tags = GetTags(o);
if (tags != null && Array.IndexOf<String>(tags, tag) > -1)
return;
o.Do("add_tags", session, o.opaque_ref, tag);
}
开发者ID:huizh,项目名称:xenadmin,代码行数:10,代码来源:Tags.cs
示例18: GpuRow
public GpuRow(IXenObject xenObject, List<PGPU> pGpuList)
: this()
{
this.xenObject = xenObject;
pGpuLabel.Text = pGpuList[0].Name;
RepopulateAllowedTypes(pGpuList[0]);
vGpuCapability = !Helpers.FeatureForbidden(xenObject, Host.RestrictVgpu) && pGpuList[0].HasVGpu;
Rebuild(pGpuList);
SetupPage();
}
开发者ID:huizh,项目名称:xenadmin,代码行数:10,代码来源:GpuRow.cs
示例19: ScriptingObject
public ScriptingObject(WebBrowser2 Browser, IXenObject XenObject)
{
browser = Browser;
connection = XenObject.Connection;
if (connection != null)
{
connection.ConnectionResult += new EventHandler<ConnectionResultEventArgs>(connection_ConnectionResult);
}
SetObject(XenObject);
}
开发者ID:heiden-deng,项目名称:xenadmin,代码行数:10,代码来源:TabPageFeature.cs
示例20: CalculatePopulateWithHiddenObject
/// <summary>
/// Calculates the nodes that should be visible in the main window tree view when the specified xen object is hidden.
/// </summary>
/// <param name="hiddenObject">The hidden object.</param>
private ComparableList<IXenObject> CalculatePopulateWithHiddenObject(IXenObject hiddenObject)
{
VirtualTreeNode rootNode = MW(() => new MainWindowTreeBuilder(new FlickerFreeTreeView()).CreateNewRootNode(new NavigationPane().Search, NavigationPane.NavigationMode.Infrastructure));
List<VirtualTreeNode> nodes = new List<VirtualTreeNode>(rootNode.Descendants);
nodes.RemoveAll(n => hiddenObject.Equals(n.Tag));
nodes.RemoveAll(n => new List<VirtualTreeNode>(n.Ancestors).Find(nn => hiddenObject.Equals(nn.Tag)) != null);
return new ComparableList<IXenObject>(nodes.ConvertAll(n => (IXenObject)n.Tag));
}
开发者ID:robhoes,项目名称:xenadmin,代码行数:14,代码来源:ShowHideTests.cs
注:本文中的IXenObject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论