Class Value
Defines a CAML value. This class has no constructors available.To instanciate a new value use public static methods.
Inheritance
Namespace: CamlBuilder
Assembly: PnP.Framework.dll
Syntax
public abstract class Value : object
Constructors
Value(ValueType)
Value(ValueType, Nullable<Boolean>)
Declaration
protected Value(ValueType type, bool? includeTimeValue)
Parameters
|
ValueType
type
|
|
System.Nullable<System.Boolean>
includeTimeValue
|
Properties
IncludeTimeValue
Specifies to build DateTime queries based on time as well as date. If you do not set this attribute, the time portion of queries that involve date and time are ignored.
Declaration
public bool? IncludeTimeValue { get; set; }
Property Value
|
System.Nullable<System.Boolean>
|
Type
Specifies the data type for the value contained by this element.
Declaration
public ValueType Type { get; }
Property Value
|
ValueType
|
Methods
GetCamlValue()
Declaration
protected abstract string GetCamlValue()
Returns
|
System.String
|
ListProperties(ValueType, IEnumerable<ListPropertyValueItem>)
Value of a specified column in the List of Lists table.
Declaration
public static Value ListProperties(ValueType type, IEnumerable<ListPropertyValueItem> listProperties)
Parameters
|
ValueType
type
Specifies the data type for the value contained by this element. |
|
IEnumerable<ListPropertyValueItem>
listProperties
List of properties. |
Returns
|
Value
Value representing a list of lists table. |
ListProperties(ValueType, Nullable<Boolean>, IEnumerable<ListPropertyValueItem>)
Value of a specified column in the List of Lists table.
Declaration
public static Value ListProperties(ValueType type, bool? includeTimeValue, IEnumerable<ListPropertyValueItem> listProperties)
Parameters
|
ValueType
type
Specifies the data type for the value contained by this element. |
|
System.Nullable<System.Boolean>
includeTimeValue
Specifies to build DateTime queries based on time as well as date. If you set this to null the time portion of queries that involve date and time are ignored. |
|
IEnumerable<ListPropertyValueItem>
listProperties
List of properties. |
Returns
|
Value
Value representing a list of lists table. |
Month()
Value representing the current month.
Can be used in together with DateRangesOverlap(FieldReference, ValueType, Object) operator to retrieve from a calendar all instances of a recurring event that occur within a month.
Declaration
public static Value Month()
Returns
|
Value
Value representing the current month. |
Month(Boolean)
Can be used in together with DateRangesOverlap(FieldReference, ValueType, Object) operator to retrieve from a calendar all instances of a recurring event that occur within a month.
Declaration
public static Value Month(bool includeTimeValue)
Parameters
|
System.Boolean
includeTimeValue
True if is to be included the time part; otherwise, false |
Returns
|
Value
Value representing the current month. |
Now()
Value representng the current date and time.
Declaration
public static Value Now()
Returns
|
Value
Value representng the current date and time. |
Now(Boolean)
Value representing the current date and time.
Declaration
public static Value Now(bool includeTimeValue)
Parameters
|
System.Boolean
includeTimeValue
True if is to be included the time part; otherwise, false |
Returns
|
Value
Value representng the current date and time. |
ObjectValue(ValueType, Nullable<Boolean>, Object)
Can be used to represent any type of value.
Declaration
public static Value ObjectValue(ValueType type, bool? includeTimeValue, object value)
Parameters
|
ValueType
type
Specifies the data type for the value contained by this element. |
|
System.Nullable<System.Boolean>
includeTimeValue
Specifies to build DateTime queries based on time as well as date. If you set this to null the time portion of queries that involve date and time are ignored. |
|
System.Object
value
Value against which the value returned by the FieldRef element is compared |
Returns
|
Value
Value representing any object value. |
Remarks
CamlBuilder uses ToString() on top of value to build the final CAML query.
ObjectValue(ValueType, Object)
Can be used to represent any type of value.
Declaration
public static Value ObjectValue(ValueType type, object value)
Parameters
|
ValueType
type
Specifies the data type for the value contained by this element. |
|
System.Object
value
Value against which the value returned by the FieldRef element is compared |
Returns
|
Value
Value representing any object value. |
Remarks
CamlBuilder uses ToString() on top of value to build the final CAML query.
Today()
Value representing the current day.
Renders the current date in the format that is relative to the server's local time zone. For servers in the United States, the format is MM/DD/YYYY (for example, 1/21/2001).
Declaration
public static Value Today()
Returns
|
Value
Value representing the current day. |
Today(Boolean)
Value representing the current day.
Renders the current date in the format that is relative to the server's local time zone. For servers in the United States, the format is MM/DD/YYYY (for example, 1/21/2001).
Declaration
public static Value Today(bool includeTimeValue)
Parameters
|
System.Boolean
includeTimeValue
True if is to be included the time part; otherwise, false |
Returns
|
Value
Value representing the current day. |
Today(Boolean, Int32)
Value representing the current day.
Renders the current date in the format that is relative to the server's local time zone. For servers in the United States, the format is MM/DD/YYYY (for example, 1/21/2001).
Declaration
public static Value Today(bool includeTimeValue, int offset)
Parameters
|
System.Boolean
includeTimeValue
True if is to be included the time part; otherwise, false |
|
System.Int32
offset
Adds or subtracts the number of days that are specified by the positive or negative integer value. |
Returns
|
Value
Value representing the current day. |
Today(Int32)
Value representing the current day.
Renders the current date in the format that is relative to the server's local time zone. For servers in the United States, the format is MM/DD/YYYY (for example, 1/21/2001).
Declaration
public static Value Today(int offset)
Parameters
|
System.Int32
offset
Adds or subtracts the number of days that are specified by the positive or negative integer value. |
Returns
|
Value
Value representing the current day. |
UserId()
Contains the value if the unique ID number of the currently authenticated user of a site, as defined in the UserInfo table of the content database.
Declaration
public static Value UserId()
Returns
|
Value
Value representing the currently authenticated user unique ID number. |