/// <summary> /// Convert the injection flags into an instance of InjectValues. /// </summary> /// <param name="flags">Flags to convert.</param> public InjectValues(InjectFlags flags) { ModifyReturn = flags.IsSet(InjectFlags.ModifyReturn); PassTag = flags.IsSet(InjectFlags.PassTag); PassInvokingInstance = flags.IsSet(InjectFlags.PassInvokingInstance); PassFields = flags.IsSet(InjectFlags.PassFields); PassLocals = flags.IsSet(InjectFlags.PassLocals); ParameterType = flags.IsSet(InjectFlags.PassParametersVal) ? PassParametersType.ByValue : (flags.IsSet(InjectFlags.PassParametersRef) ? PassParametersType.ByReference : PassParametersType.None); }