new support power impl

This commit is contained in:
Chris Forbes
2010-01-23 21:07:27 +13:00
parent bbf94fef79
commit d7a2691db3
56 changed files with 409 additions and 489 deletions

View File

@@ -27,15 +27,15 @@ namespace OpenRa.FileFormats
public T Get<T>()
{
var l = innerInherit[ typeof( T ) ];
if( l.Count == 1 )
return (T)l[ 0 ];
else if( l.Count == 0 )
throw new InvalidOperationException( string.Format( "TypeDictionary does not contain instance of type `{0}`", typeof( T ) ) );
var l = innerInherit[typeof(T)];
if (l.Count == 1)
return (T)l[0];
else if (l.Count == 0)
throw new InvalidOperationException(string.Format("TypeDictionary does not contain instance of type `{0}`", typeof(T)));
else
throw new InvalidOperationException( string.Format( "TypeDictionary contains multiple instance of type `{0}`", typeof( T ) ) );
throw new InvalidOperationException(string.Format("TypeDictionary contains multiple instance of type `{0}`", typeof(T)));
}
public T GetOrDefault<T>()
{
var l = innerInherit[ typeof( T ) ];