当前位置: 首页>>代码示例>>C#>>正文


C# IXenObject类代码示例

本文整理汇总了C#中IXenObject的典型用法代码示例。如果您正苦于以下问题:C# IXenObject类的具体用法?C# IXenObject怎么用?C# IXenObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IXenObject类属于命名空间,在下文中一共展示了IXenObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的IXenObject类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。