private void InheritAttributes(IReflectionInfo test) { var otherAttributes = test.GetCustomAttributes <DependantAttribute>(true); var newSetupTypes = new List <Type>(this.ExecuteInSetupTypes); foreach (var otherAttribute in otherAttributes) { if (otherAttribute.Inherit) { foreach (var otherSetupType in otherAttribute.ExecuteInSetupTypes) { if (!newSetupTypes.Contains(otherSetupType)) { newSetupTypes.Add(otherSetupType); } } } } ExecuteInSetupTypes = newSetupTypes.ToArray(); }
private static bool IsFrozen(IReflectionInfo reflectionInfo) { return(reflectionInfo.GetCustomAttributes <FrozenAttribute>(true).Any()); }
private static bool IsFrozen(IReflectionInfo reflectionInfo) => reflectionInfo.GetCustomAttributes<FrozenAttribute>(true).Any();