/// <summary> /// Returns whether or not the given method is declared on this strategy's method declaration type /// </summary> /// <param name="toReplace">The method to replace</param> /// <returns>True if it can be replaced, false otherwise</returns> protected virtual bool CanReplace(MethodInfo toReplace) { ExceptionUtilities.CheckArgumentNotNull(toReplace, "toReplace"); return(toReplace.DeclaringType == this.MethodDeclarationType); }
/// <summary> /// Initializes a new instance of the UpdatableToken class /// </summary> /// <param name="resource">The actual resource</param> public UpdatableToken(object resource) { ExceptionUtilities.CheckArgumentNotNull(resource, "resource"); this.Resource = resource; this.PendingPropertyUpdates = new Dictionary <string, object>(); }
private static bool IsUntypedOrdering(MethodInfo method) { ExceptionUtilities.CheckArgumentNotNull(method, "method"); return((method.Name.StartsWith("OrderBy", StringComparison.Ordinal) || method.Name.StartsWith("ThenBy", StringComparison.Ordinal)) && method.GetGenericArguments()[1] == typeof(object)); }