102 lines
3.4 KiB
C#
102 lines
3.4 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2008 - 2009 All Rights Reserved.
|
|
//
|
|
// File: ICimData.cs
|
|
//
|
|
// Contents: ICimData is a part of the CimFramework project.
|
|
// It defines an interface for CIM data.
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
namespace Intel.Manageability.Cim.Untyped
|
|
{
|
|
/// <summary>
|
|
/// Interface that defines the CIM data methods.
|
|
/// </summary>
|
|
public interface ICimData
|
|
{
|
|
/// <summary>
|
|
/// Get/Set the CIM Field value
|
|
/// </summary>
|
|
/// <param name="name">CIM Field name</param>
|
|
/// <returns>The field's values</returns>
|
|
string[] this[string name]{get; set;}
|
|
|
|
/// <summary>
|
|
/// Get the CIM Field value
|
|
/// </summary>
|
|
/// <param name="name">CIM Field name</param>
|
|
/// <returns>The field's values</returns>
|
|
string[] GetField(string name);
|
|
|
|
/// <summary>
|
|
/// Copy CIM data
|
|
/// </summary>
|
|
/// <param name="other">CIM data to be copied</param>
|
|
void Copy(ICimData other);
|
|
|
|
/// <summary>
|
|
/// Add a new CIM Field
|
|
/// </summary>
|
|
/// <param name="name">Field Name</param>
|
|
/// <param name="values">Field values</param>
|
|
void AddField(string name, string[] values);
|
|
|
|
/// <summary>
|
|
/// Set the values of a CIM Field
|
|
/// </summary>
|
|
/// <param name="name">CIM Field name</param>
|
|
/// <param name="values">Field values</param>
|
|
void SetField(string name, string[] values);
|
|
|
|
/// <summary>
|
|
/// Set or add a CIM Field
|
|
/// If the field does not exist, the function adds it, otherwise the function sets its value.
|
|
/// </summary>
|
|
/// <param name="name">CIM Field name</param>
|
|
/// <param name="values">Field values</param>
|
|
void SetOrAddField(string name, string[] values);
|
|
|
|
/// <summary>
|
|
/// Set or add a CIM Field
|
|
/// If the field does not exist, the function adds it, otherwise the function sets its value.
|
|
/// </summary>
|
|
/// <param name="name">CIM Field name</param>
|
|
/// <param name="value">Field value</param>
|
|
void SetOrAddField(string name, string value);
|
|
|
|
/// <summary>
|
|
/// Remove a Cim Field
|
|
/// </summary>
|
|
/// <param name="name">CIM Field name</param>
|
|
void RemoveField(string name);
|
|
|
|
/// <summary>
|
|
/// Try to get a CIM Field
|
|
/// </summary>
|
|
/// <param name="name">CIM Field name</param>
|
|
/// <param name="values">Field values</param>
|
|
/// <returns>True if the field exists, otherwise false</returns>
|
|
bool TryGetValue(string name, out string[] values);
|
|
|
|
/// <summary>
|
|
/// Check if a given field exists in the current object
|
|
/// </summary>
|
|
/// <param name="name">Field name</param>
|
|
/// <returns>True if the given field exists in the current object</returns>
|
|
bool ContainsField(string name);
|
|
|
|
/// <summary>
|
|
/// Serialize CIM object to XML
|
|
/// </summary>
|
|
/// <returns>XML that represents the CIM object</returns>
|
|
string Serialize();
|
|
|
|
/// <summary>
|
|
/// Deserialize CIM object from XML
|
|
/// </summary>
|
|
/// <param name="xml">XML that represents the CIM object</param>
|
|
void Deserialize(string xml);
|
|
}
|
|
}
|