internal static string ToStringType(this ObjectMatcherTypes objectMatcher) { switch (objectMatcher) { case ObjectMatcherTypes.Equal: return("->eq"); case ObjectMatcherTypes.NotEqual: return("->neq"); default: throw new ArgumentOutOfRangeException(nameof(objectMatcher), objectMatcher, null); } }
/// <summary> /// the ObjectMatcher Aggregation /// </summary> /// <param name="name">the name of Element you want to Match it</param> /// <param name="value">the value of Element you want to Match it</param> /// <param name="matcherType">The Type of Object Match</param> public ObjectMatcher(string name, object value, ObjectMatcherTypes matcherType) { _name = string.IsNullOrEmpty(name) ? throw new GameServiceException("Name Cant Be EmptyOrNull").LogException <ObjectMatcher>( DebugLocation.Internal, "Constructor") : _name = name; _value = value == null ? throw new GameServiceException("Value Cant Be Null").LogException <ObjectMatcher>( DebugLocation.Internal, "Constructor") : _value = value; _type = matcherType; }