public bool CanExecute(OperationContext context) { //check operation Name if (OperationName.Equals(context.OperationName) == false) { return(false); } //accept specific resource if (ExecuteOnSpecificInstance && string.IsNullOrWhiteSpace(context.ResourceId) == false) { return(true); } //accept specific type if (SupportedTypes.Any(t => t.ToString().Equals(context.ResourceType)) && string.IsNullOrEmpty(context.ResourceType) == false) { return(true); } //accept global if (SupportedTypes.Any(t => t.Equals(context.ResourceType)) == false && context.ResourceType == null) { return(true); } return(false); }
public override bool Equals(object obj) { var edge = obj as CallGraphEdge; return(edge != null && OperationName.Equals(edge.OperationName) && OperationCallerName.Equals(edge.OperationCallerName) && FunctorSpecialization == edge.FunctorSpecialization && CallerFunctorSpecialization == edge.CallerFunctorSpecialization); }
public override bool Equals(object o) { if (this == o) { return true; } if (o == null || GetType() != o.GetType()) { return false; } var that = (QueryGraphValueEntryCustomKeyForge) o; if (!OperationName.Equals(that.OperationName)) { return false; } return ExprNodeUtilityCompare.DeepEquals(ExprNodes, that.ExprNodes, true); }