Beispiel #1
0
 public static IReadOnlyEntity AsReadOnly(this IReadOnlyEntity self, IReadOnlyComponentFilter componentFilter)
 {
     if (self == null)
     {
         throw new ArgumentNullException(nameof(self));
     }
     if (componentFilter == null)
     {
         throw new ArgumentNullException(nameof(componentFilter));
     }
     return(new FilteredEntity(self, componentFilter));
 }
Beispiel #2
0
 public FilteredEntity(IReadOnlyEntity entity, IReadOnlyComponentFilter componentFilter)
 {
     if (entity == null)
     {
         throw new ArgumentNullException(nameof(entity));
     }
     if (componentFilter == null)
     {
         throw new ArgumentNullException(nameof(componentFilter));
     }
     Entity          = entity;
     ComponentFilter = componentFilter;
 }