/// <summary> /// Returns the alternate platform given a platform. For example, if <see cref="Platform.Windows"/> is provided, <see cref="Platform.NonWindows"/> is returned, and vice-versa. /// </summary> public static Platform GetAlternatePlatform(Platform platform) { switch (platform) { case Platform.NonWindows: return(Platform.Windows); case Platform.Windows: return(Platform.NonWindows); default: throw EnumerationHelper.UnexpectedEnumerationValueException(platform); } }
public static string ToStringStandard(this ServiceLifetime serviceLifetime) { switch (serviceLifetime) { case ServiceLifetime.Scoped: return(ServiceLifetimeHelper.ScopedStandardRepresentation); case ServiceLifetime.Singleton: return(ServiceLifetimeHelper.SingletonStandardRepresentation); case ServiceLifetime.Transient: return(ServiceLifetimeHelper.TransientStandardRepresentation); default: throw EnumerationHelper.UnexpectedEnumerationValueException(serviceLifetime); } }