{
[DataContract]
public class AgentStoredProcMessage
{
///
/// An unique and agreed upon value that indicates to whom the message is to go to.
///
[DataMember( IsRequired = true )]
public string ConnectorId { get; set; }
///
/// The name of the stored procedure without the schema name. We will add the schema name when it is called.
/// This value must not contain a period, space or whitespace (tabs, cr, lf).
///
[DataMember( IsRequired = true )]
public string Procedure { get; set; }
///
/// An array of parameters.
///
[DataMember( IsRequired = false )]
public AgentStoredProcParam[] Params { get; set; }
}
[DataContract]
public class AgentStoredProcParam
{
///
/// The name of the parameter.
///
///
/// It is unnecessary to include the leading @ character.
///
[DataMember( IsRequired = true )]
public string Name { get; set; }
///
/// The data value of the parameter.
///
///
/// This field is always a string and data will be converted to the appropriate data type.
/// Dates should be in the format "yyyy-MM-dd" or any similar format that works for ALL
/// locales (e.g. MM/dd/yyyy will not work in a Canadian system using dd/MM/yyyy date formats).
/// Binary data should be in base64 encoded format.
/// Numbers should be in an appropriate format but should not contain commas, currency symbols. Just
/// digits, one decimal point, negative sign, possible exponent E.
///
/// Null data value should be "Value": null or the Value property is just omitted altogether.
///
[DataMember( IsRequired = false )]
public string Value { get; set; }
///
/// The SQL Server data type.
///
///
/// Valid values: any of the following SQL Server data types are supported:
/// int
/// bigint
/// decimal
/// numeric
/// smallint
/// bit (must be either "true" or "false")
/// tinyint
/// float
/// real
/// char
/// nchar
/// varchar
/// nvarchar
/// money
/// date
/// time
/// datetime
/// datetime2
/// smalldatetime
/// xml (see IsXmlDocumentFragment property below)
///
/// This is case insensitive. The following are not supported, but you can
/// use the suggested types instead:
/// text (use varchar with max size)
/// ntext (use nvarchar with max size)
///
[DataMember( IsRequired = true )]
public string DataType { get; set; }
///
/// The max size of the parameter. Suggested for all string data.
/// It is the precision size parameter for decimal and numeric data
/// (the first size parameter). Use -1 when the size is 'max' (for
/// example, varchar(max), nvarchar(max)). The default for precision
/// is 18 and for strings is 30 (even for char and nchar).
///
[DataMember( IsRequired = false )]
public int MaxSize { get; set; }
///
/// The scale size of the parameter. Used in decimal and numeric
/// types (the second size parameter) only. Default scale is 0.
///
[DataMember( IsRequired = false )]
public int Scale { get; set; }
///
/// True if input/output and false if input only (the default).
///
///
/// There is no current way to retrieve output parameter values.
///
[DataMember( IsRequired = false )]
public bool IsOutputParam { get; set; }
///
/// Determines the XmlNodeType enum value that is used only for
/// xml data type only. Default of false uses Document while
/// true uses DocumentFragment.
///
[DataMember( IsRequired = false )]
public bool IsXmlDocumentFragment { get; set; }
}
}