Share via


ITextTemplatingSession Interface

Can be used to transmit information from a directive processor into a text template.

Namespace:  Microsoft.VisualStudio.TextTemplating
Assembly:  Microsoft.VisualStudio.TextTemplating.Interfaces.10.0 (in Microsoft.VisualStudio.TextTemplating.Interfaces.10.0.dll)

Syntax

'Declaration
<CLSCompliantAttribute(True)> _
Public Interface ITextTemplatingSession _
    Inherits IEquatable(Of ITextTemplatingSession), IEquatable(Of Guid),  _
    IDictionary(Of String, Object), ICollection(Of KeyValuePair(Of String, Object)),  _
    IEnumerable(Of KeyValuePair(Of String, Object)), IEnumerable,  _
    ISerializable
[CLSCompliantAttribute(true)]
public interface ITextTemplatingSession : IEquatable<ITextTemplatingSession>, 
    IEquatable<Guid>, IDictionary<string, Object>, ICollection<KeyValuePair<string, Object>>, 
    IEnumerable<KeyValuePair<string, Object>>, IEnumerable, ISerializable
[CLSCompliantAttribute(true)]
public interface class ITextTemplatingSession : IEquatable<ITextTemplatingSession^>, 
    IEquatable<Guid>, IDictionary<String^, Object^>, 
    ICollection<KeyValuePair<String^, Object^>>, IEnumerable<KeyValuePair<String^, Object^>>, 
    IEnumerable, ISerializable
[<CLSCompliantAttribute(true)>]
type ITextTemplatingSession =  
    interface 
        interface IEquatable<ITextTemplatingSession>
        interface IEquatable<Guid>
        interface IDictionary<string, Object>
        interface ICollection<KeyValuePair<string, Object>>
        interface IEnumerable<KeyValuePair<string, Object>>
        interface IEnumerable 
        interface ISerializable 
    end
public interface ITextTemplatingSession extends IEquatable<ITextTemplatingSession>, IEquatable<Guid>, IDictionary<String, Object>, ICollection<KeyValuePair<String, Object>>, IEnumerable<KeyValuePair<String, Object>>, IEnumerable, ISerializable

The ITextTemplatingSession type exposes the following members.

Properties

  Name Description
Public property Count Gets the number of elements contained in the ICollection. (Inherited from ICollection<KeyValuePair<String, Object>>.)
Public property Id Identity of this session, used to compare session instances by value.
Public property IsReadOnly Gets a value indicating whether the ICollection is read-only. (Inherited from ICollection<KeyValuePair<String, Object>>.)
Public property Item Gets or sets the element with the specified key. (Inherited from IDictionary<String, Object>.)
Public property Keys Gets an ICollection containing the keys of the IDictionary. (Inherited from IDictionary<String, Object>.)
Public property Values Gets an ICollection containing the values in the IDictionary. (Inherited from IDictionary<String, Object>.)

Top

Methods

  Name Description
Public method Add(UTP) Adds an item to the ICollection. (Inherited from ICollection<KeyValuePair<String, Object>>.)
Public method Add(UTP, UTP) Adds an element with the provided key and value to the IDictionary. (Inherited from IDictionary<String, Object>.)
Public method Clear Removes all items from the ICollection. (Inherited from ICollection<KeyValuePair<String, Object>>.)
Public method Contains Determines whether the ICollection contains a specific value. (Inherited from ICollection<KeyValuePair<String, Object>>.)
Public method ContainsKey Determines whether the IDictionary contains an element with the specified key. (Inherited from IDictionary<String, Object>.)
Public method CopyTo Copies the elements of the ICollection to an Array, starting at a particular Array index. (Inherited from ICollection<KeyValuePair<String, Object>>.)
Public method Equals(UTP) Indicates whether the current object is equal to another object of the same type. (Inherited from IEquatable<Guid>.)
Public method Equals(UTP) (Inherited from IEquatable<ITextTemplatingSession>.)
Public method GetEnumerator Returns an enumerator that iterates through the collection. (Inherited from IEnumerable<KeyValuePair<String, Object>>.)
Public method GetObjectData Security Critical. Populates a SerializationInfo with the data needed to serialize the target object. (Inherited from ISerializable.)
Public method Remove(UTP) Removes the element with the specified key from the IDictionary. (Inherited from IDictionary<String, Object>.)
Public method Remove(UTP) Removes the first occurrence of a specific object from the ICollection. (Inherited from ICollection<KeyValuePair<String, Object>>.)
Public method TryGetValue Gets the value associated with the specified key. (Inherited from IDictionary<String, Object>.)

Top

Remarks

Sessions are objects serialized across application domains and processes. They have dictionary behavior to allow parameters to be passed into the T4 engine. They are compared by comparing their GUID-based ID property to allow different implementation types to be directly compared.

See Also

Reference

Microsoft.VisualStudio.TextTemplating Namespace