C# Class Catel.ReSharper.CatelProperties.CSharp.ClassLikeDeclarationExtensions

The IClassLikeDeclaration extension methods.
Show file Open project: Catel/Catel.ReSharper

Public Methods

Method Description
GetCSharpRegisterPropertyNames ( this classLikeDeclaration ) : List

Get the registered property names.

The name of the property is retrieved from the first argument of the invoke expression of RegisterProperty. Register the Name property so it is known in the class. public static readonly PropertyData NameProperty = RegisterProperty("Name", typeof(string), default(string), (s, e) => ((PersonViewModel)s).OnNameChanged());

Register the LastName property so it is known in the class. public static readonly PropertyData LastNameProperty = RegisterProperty("LastName", typeof(string), default(string), (s, e) => ((PersonViewModel)s).OnLastNameChanged()); } ]]> The result of this examples the result is {"Name", "LastName"}. If the property is not registered on the declaration statement expression then the property name is not detected.
IsStaticEx ( this classLikeDeclaration ) : bool

Gets a value indicating whether the class is static.

Method Details

GetCSharpRegisterPropertyNames() public static method

Get the registered property names.
The name of the property is retrieved from the first argument of the invoke expression of RegisterProperty. Register the Name property so it is known in the class. public static readonly PropertyData NameProperty = RegisterProperty("Name", typeof(string), default(string), (s, e) => ((PersonViewModel)s).OnNameChanged()); Register the LastName property so it is known in the class. public static readonly PropertyData LastNameProperty = RegisterProperty("LastName", typeof(string), default(string), (s, e) => ((PersonViewModel)s).OnLastNameChanged()); } ]]> The result of this examples the result is {"Name", "LastName"}. If the property is not registered on the declaration statement expression then the property name is not detected.
/// The is null. ///
public static GetCSharpRegisterPropertyNames ( this classLikeDeclaration ) : List
classLikeDeclaration this /// The class like declaration instance. ///
return List

IsStaticEx() public static method

Gets a value indicating whether the class is static.
/// The is null. ///
public static IsStaticEx ( this classLikeDeclaration ) : bool
classLikeDeclaration this /// The class declaration. ///
return bool