/// <summary> /// Add a method to the definition for the entity. /// </summary> /// <param name="entity"></param> /// <param name="method"></param> private static void AddMethodToEntity(OrmEntity entity, MethodDescription method) { OrmEntityMethod targetMethod = null; targetMethod = method.CreateMethod(entity); OrmMethodTarget targetStep = method.CreateTarget(AUTOWIRE_HEADER); TargetMethodCollection targetColl = null; switch (method.StepType) { case TargetStepType.PreExecute: targetColl = targetMethod.PreExecuteTargets; break; case TargetStepType.PostFlush: targetColl = targetMethod.PostFlushTargets; break; case TargetStepType.PostExecute: targetColl = targetMethod.PostExecuteTargets; break; case TargetStepType.Primary: default: targetColl = targetMethod.MethodTargets; break; } targetColl.Add(targetStep); entity.Methods.Add(targetMethod); }
public bool MatchTarget(OrmMethodTarget target, TargetStepType targetStepType, String descriptionPrefix) { return(targetStepType == StepType && descriptionPrefix + Description == target.Description && target.TargetMethod == Name && target.TargetType == DeclaringType); }
public bool MatchTarget(OrmMethodTarget target, TargetStepType targetStepType, String descriptionPrefix) { return targetStepType == StepType && descriptionPrefix + Description == target.Description && target.TargetMethod == Name && target.TargetType == DeclaringType; }
private static bool IsOpenSlxTarget(OrmMethodTarget target) { return target.Description != null && target.Description.Contains(AUTOWIRE_HEADER); }
private static bool IsOpenSlxTarget(OrmMethodTarget target) { return(target.Description != null && target.Description.Contains(AUTOWIRE_HEADER)); }