Пример #1
0
 public bool Contains(ActivityStreamFilter other)
 {
     return((includeReplies == other.includeReplies || !includeReplies.HasValue) &&
            (index == other.index || string.IsNullOrWhiteSpace(index)) &&
            (id == other.id || id == null) &&
            (handle == other.handle || string.IsNullOrWhiteSpace(handle)) &&
            (types == null || other.types == null || !types.Except(other.types).Any()) &&
            (objectTypes == null || other.objectTypes == null || !objectTypes.Except(other.objectTypes).Any()) &&
            (targetTypes == null || other.targetTypes == null || !targetTypes.Except(other.targetTypes).Any()) &&
            (type == null || type == other.type));
 }
Пример #2
0
 public ActivityStreamFilter Extend(ActivityStreamFilter other)
 {
     return(new ActivityStreamFilter(index ?? other.index)
     {
         id = id ?? other.id,
         handle = handle ?? other.handle,
         types = types ?? other.types,
         objectTypes = objectTypes ?? other.objectTypes,
         targetTypes = targetTypes ?? other.targetTypes,
         type = type ?? other.type,
         // includeReplies = includeReplies ?? other.includeReplies,
     });
 }