public CompositeUserActivityReport( int db, string key, string operation, UserActivityReport left, UserActivityReport right) : base(db, key) { Validation.ValidateString( operation, ErrorMessages.CompositeUserActivityReport_Constructor_Operation_Required, "operation"); if (left == null) { throw new ArgumentNullException("left"); } if (left == null) { throw new ArgumentNullException("left"); } Operation = operation; Left = left; Right = right; }
public static async Task <bool> Contains( this UserActivityReport instance, long user) { if (instance == null) { throw new ArgumentNullException("instance"); } var result = await instance.Includes(user); return(result.First()); }
public static UserActivityReport Xor( UserActivityReport left, UserActivityReport right) { if (left == null) { throw new ArgumentNullException("left"); } if (right == null) { throw new ArgumentNullException("right"); } var key = left.Key + "^" + right.Key; return new CompositeUserActivityReport( left.Db, key, "XOR", left.Key, right.Key); }
public static UserActivityReport Xor( UserActivityReport left, UserActivityReport right) { if (left == null) { throw new ArgumentNullException("left"); } if (right == null) { throw new ArgumentNullException("right"); } var key = left.Key + "^" + right.Key; return(new CompositeUserActivityReport( left.Db, key, "XOR", left, right)); }
public static UserActivityReport BitwiseAnd( UserActivityReport left, UserActivityReport right) { if (left == null) { throw new ArgumentNullException("left"); } if (right == null) { throw new ArgumentNullException("right"); } var key = left.Key + "&" + right.Key; return new CompositeUserActivityReport( left.Db, key, "AND", left, right); }