Moving GetOrDefault into extension

This commit is contained in:
Eugene Sadovoi 2017-10-28 15:23:21 -04:00
Родитель a8b42734a3
Коммит a181ecded9
10 изменённых файлов: 14 добавлений и 14 удалений

Просмотреть файл

@ -46,7 +46,7 @@ namespace Unity.Interception.ContainerIntegration
}
/// <summary>
/// Get the list of behaviors for the current type so that it can be added to.
/// GetOrDefault the list of behaviors for the current type so that it can be added to.
/// </summary>
/// <param name="policies">Policy list.</param>
/// <param name="implementationType">Implementation type to set behaviors for.</param>

Просмотреть файл

@ -46,7 +46,7 @@ namespace Unity.Interception.ContainerIntegration
}
/// <summary>
/// Get the list of behaviors for the current type so that it can be added to.
/// GetOrDefault the list of behaviors for the current type so that it can be added to.
/// </summary>
/// <param name="policies">Policy list.</param>
/// <param name="implementationType">Implementation type to set behaviors for.</param>

Просмотреть файл

@ -92,7 +92,7 @@ namespace Unity.Interception.ContainerIntegration
}
/// <summary>
/// Get the list of behaviors for the current type so that it can be added to.
/// GetOrDefault the list of behaviors for the current type so that it can be added to.
/// </summary>
/// <param name="policies">Policy list.</param>
/// <param name="implementationType">Implementation type to set behaviors for.</param>

Просмотреть файл

@ -16,13 +16,13 @@ namespace Unity.Interception.ContainerIntegration.ObjectBuilder
public interface IInterceptionBehaviorsPolicy : IBuilderPolicy
{
/// <summary>
/// Get the set of <see cref="NamedTypeBuildKey"/> that can be used to resolve the
/// GetOrDefault the set of <see cref="NamedTypeBuildKey"/> that can be used to resolve the
/// behaviors.
/// </summary>
IEnumerable<NamedTypeBuildKey> BehaviorKeys { get; }
/// <summary>
/// Get the set of <see cref="IInterceptionBehavior"/> object to be used for the given type and
/// GetOrDefault the set of <see cref="IInterceptionBehavior"/> object to be used for the given type and
/// interceptor.
/// </summary>
/// <remarks>

Просмотреть файл

@ -19,13 +19,13 @@ namespace Unity.Interception.ContainerIntegration.ObjectBuilder
private readonly List<NamedTypeBuildKey> _behaviorKeys = new List<NamedTypeBuildKey>();
/// <summary>
/// Get the set of <see cref="NamedTypeBuildKey"/> that can be used to resolve the
/// GetOrDefault the set of <see cref="NamedTypeBuildKey"/> that can be used to resolve the
/// behaviors.
/// </summary>
public IEnumerable<NamedTypeBuildKey> BehaviorKeys => _behaviorKeys;
/// <summary>
/// Get the set of <see cref="IInterceptionBehavior"/> object to be used for the given type and
/// GetOrDefault the set of <see cref="IInterceptionBehavior"/> object to be used for the given type and
/// interceptor.
/// </summary>
/// <remarks>

Просмотреть файл

@ -33,7 +33,7 @@ namespace Unity.Interception.InterceptionBehaviors
}
/// <summary>
/// Get the number of interceptors in this pipeline.
/// GetOrDefault the number of interceptors in this pipeline.
/// </summary>
public int Count => _interceptionBehaviors.Count;

Просмотреть файл

@ -437,10 +437,10 @@ namespace Unity.Interception.Interceptors.InstanceInterceptors.InterfaceIntercep
ParameterInfo pi = _methodParameters[paramNum];
if (pi.ParameterType.IsByRef)
{
// Get the original parameter value - address of the ref or out
// GetOrDefault the original parameter value - address of the ref or out
EmitLoadArgument(il, paramNum);
// Get the value of this output parameter out of the Outputs collection
// GetOrDefault the value of this output parameter out of the Outputs collection
il.Emit(OpCodes.Ldloc, methodReturn);
il.Emit(OpCodes.Callvirt, IMethodReturnMethods.GetOutputs);
EmitLoadConstant(il, outputArgNum++);

Просмотреть файл

@ -451,11 +451,11 @@ namespace Unity.Interception.Interceptors.TypeInterceptors.VirtualMethodIntercep
int outArgIndex = 0;
foreach (int parameterIndex in OutputParameterIndices)
{
// Get parameter value (the address) onto the stack)
// GetOrDefault parameter value (the address) onto the stack)
Type elementType = paramMapper.GetElementType(_methodParameters[parameterIndex].ParameterType);
EmitLoadArgument(il, parameterIndex);
// Get result of output parameter out of the results array
// GetOrDefault result of output parameter out of the results array
il.Emit(OpCodes.Ldloc, methodReturn);
il.Emit(OpCodes.Callvirt, IMethodReturnMethods.GetOutputs);
EmitLoadConstant(il, outArgIndex);

Просмотреть файл

@ -31,7 +31,7 @@ namespace Unity.Interception.PolicyInjection.Pipeline
}
/// <summary>
/// Get the number of handlers in this pipeline.
/// GetOrDefault the number of handlers in this pipeline.
/// </summary>
public int Count => _handlers.Count;

Просмотреть файл

@ -48,7 +48,7 @@ namespace Unity.Interception.PolicyInjection.Pipeline
}
/// <summary>
/// Get the pipeline for the given method, creating it if necessary.
/// GetOrDefault the pipeline for the given method, creating it if necessary.
/// </summary>
/// <param name="method">Method to retrieve the pipeline for.</param>
/// <param name="handlers">Handlers to initialize the pipeline with</param>