You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
547 B
18 lines
547 B
using System; |
|
|
|
namespace DotSDL.Platform { |
|
/// <summary> |
|
/// Senses the user's platform and returns a new instance of the most |
|
/// appropriate <see cref="IPlatform"/> implementation. |
|
/// </summary> |
|
public static class PlatformFactory { |
|
public static IPlatform GetPlatform() { |
|
switch(Environment.OSVersion.Platform) { |
|
case PlatformID.Unix: |
|
return new PosixPlatform(); |
|
default: |
|
return new BasePlatform(); |
|
} |
|
} |
|
} |
|
}
|
|
|