C# Class Thinktecture.Tools.Web.Services.CodeGeneration.AttributableCodeDomObject

Inheritance: System.CodeDom.CodeTypeMember
Datei anzeigen Open project: WSCF/WSCF

Public Methods

Method Description
AddAttribute ( CodeAttributeDeclaration attribDecl ) : bool

Adds a new attribute to a attributes collection or modify an existing attribute. It checks whether a given attribute exists and adds it if its not there. If it is there, then it will add the arguments available in the new attribute but not available in the existing attribute.

AttributableCodeDomObject ( CodeTypeMember extendedObject ) : System
FindAttribute ( string attributeName ) : CodeAttributeDeclaration

This method finds the attribute as specified by attribute parameter.

This method initially looks up an internal attribute cache. If the attribute is not found in the cache, it searches for it in the actual object extended by this instance. If the attribute is found, this method adds it to internal cache causing the faster access time in the subsequent requests.

FindAttributes ( string attributeName ) : IEnumerable

Finds all instances of the attribute with the specified name.

RemoveAttribute ( CodeAttributeDeclaration attribute ) : void

Removes the attribute from the custom attributes collection of the type.

Private Methods

Method Description
SyncSourceAttributes ( CodeAttributeDeclaration source, CodeAttributeDeclaration destination ) : void

Method Details

AddAttribute() public method

Adds a new attribute to a attributes collection or modify an existing attribute. It checks whether a given attribute exists and adds it if its not there. If it is there, then it will add the arguments available in the new attribute but not available in the existing attribute.
public AddAttribute ( CodeAttributeDeclaration attribDecl ) : bool
attribDecl System.CodeDom.CodeAttributeDeclaration
return bool

AttributableCodeDomObject() public method

public AttributableCodeDomObject ( CodeTypeMember extendedObject ) : System
extendedObject System.CodeDom.CodeTypeMember
return System

FindAttribute() public method

This method finds the attribute as specified by attribute parameter.
This method initially looks up an internal attribute cache. If the attribute is not found in the cache, it searches for it in the actual object extended by this instance. If the attribute is found, this method adds it to internal cache causing the faster access time in the subsequent requests.
public FindAttribute ( string attributeName ) : CodeAttributeDeclaration
attributeName string
return System.CodeDom.CodeAttributeDeclaration

FindAttributes() public method

Finds all instances of the attribute with the specified name.
public FindAttributes ( string attributeName ) : IEnumerable
attributeName string Name of the attribute.
return IEnumerable

RemoveAttribute() public method

Removes the attribute from the custom attributes collection of the type.
public RemoveAttribute ( CodeAttributeDeclaration attribute ) : void
attribute System.CodeDom.CodeAttributeDeclaration The attribute to remove.
return void