82 lines
3.3 KiB
C#

// Copyright (C) Intel Corporation, 2010 All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace Intel.Management.Wsman
{
/// <summary>
/// Represents object instance data exchanged with a Wsman Service
/// </summary>
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
[Guid("D9E2A225-6E6F-499a-854B-1CC49B609771")]
[ComVisible(true)]
public interface IManagedInstance
{
/// <summary>
/// Gets the connection object associated with the instance data
/// </summary>
IWsmanConnection Connection { get;}
/// <summary>
/// Gets the XML representation of the instance data
/// </summary>
string Xml { get; set; }
/// <summary>
/// Gets resourceUri of the reference
/// </summary>
string ResourceUri { get;}
/// <summary>
/// Get The simple name of the resource
/// </summary>
/// <return>Returns the last component of the ResourceUri</return>
string SimpleName { get; }
/// <summary>
/// Get method name if the instance data is representing method input parameters
/// </summary>
string MethodName { get;}
/// <summary>
/// Gets the value of a property associated with the instance
/// </summary>
/// <param name="name">The name of a property associated with the instance</param>
/// <return>Returns an object containing the property value</return>
IWsmanItem GetProperty(string name);
/// <summary>
/// Sets the value of a property associated with the instance
/// </summary>
/// <param name="name">The name of a property associated with the instance</param>
/// <param name="value">The property value</param>
void SetProperty(string name, object value);
/// <summary>
/// Adds a property to the instance
/// </summary>
/// <param name="name">The name of a property associated with the instance</param>
/// <param name="value">The property value</param>
void AddProperty(string name, object value);
/// <summary>
/// Removes a property from the instance
/// </summary>
/// <param name="name">The name of a property associated with the instance</param>
void RemoveProperty(string name);
/// <summary>
/// Returns the property names currently associated with the instance data
/// </summary>
/// <return>Returns an object containing the array property names</return>
IWsmanItem GetPropertyNames();
/// <summary>
/// Creates the instance data on the remote server
/// </summary>
/// <return>Returns a reference to the newly created instance data</return>
IManagedReference Create();
/// <summary>
/// Gets or set the text data contained in the instance
/// </summary>
string Text { get; set; }
/// <summary>
/// Converts the instance to a reference
/// </summary>
///<param name="keynames">A space delimited array of property names to include in the reference</param>
IManagedReference ToReference(string keynames);
}
}