Wiki

Clone wiki

TraceabilityV2 / TraceCodeGenLib / SkipMap

Home

TraceCodeGenerator Lib

#SkipMap

A SkipMap may be used with the code generators to skip specific methods or properties. This can be useful if we do not want to trace a member for some reason, or that we want to manually write the trace code.

In the latter case, be sure to use the MakePartial() call on the code generator, and place the custom code in a separate file.

By default, the following members are always skipped during tracing: Dispose() Finalize() MemberwiseClone() ToString() Equals(object) Equals(object object) ReferenceEquals()) GetType() GetHashCode()

##Constructors ###SkipMap() Constructs a skip map instance.

##Methods ###SkipMap Add(string name, bool isParameterized) Adds a member name to the skip map.

####string name The name of the member.

####bool isParameterized If this is set to false, then any method matching the name will be skipped, regardless of overloading. If this is set to true, then only methods with the same parameterization will be skipped. This setting has no effect on properties, as they do not have overloads.

###SkipMap Add(Type skipType) Adds a class type to the skip map. Each property will have its name added to the mapping. Each method will be added as well, but will be strictly parameterized.

###bool ShouldSkip(PropertyInfo propertyInfo) Checks to see if the passed in property is present in the SkipMap.

###bool ShouldSkip(MethodInfo methodInfo) Checks to see if the passed in method is present in the SkipMap. Both strict parameterization and non-parameterized will be checked.

Updated