mirror of
https://github.com/ZuneDev/Xune.git
synced 2026-07-27 13:13:10 -07:00
Format RenderApi code
This commit is contained in:
+17
-17
@@ -39,7 +39,7 @@ public class Map
|
||||
get
|
||||
{
|
||||
int entry = this.FindEntry(key);
|
||||
return entry >= 0 ? this._entries[entry].value : (object) null;
|
||||
return entry >= 0 ? this._entries[entry].value : (object)null;
|
||||
}
|
||||
set => this.Insert(key, value, false);
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public class Map
|
||||
return;
|
||||
for (int index = 0; index < this._buckets.Length; ++index)
|
||||
this._buckets[index] = -1;
|
||||
Array.Clear((Array) this._entries, 0, this._count);
|
||||
Array.Clear((Array)this._entries, 0, this._count);
|
||||
this._freeList = -1;
|
||||
this._count = 0;
|
||||
this._freeCount = 0;
|
||||
@@ -132,7 +132,7 @@ public class Map
|
||||
for (int index = 0; index < numArray.Length; ++index)
|
||||
numArray[index] = -1;
|
||||
Map.Entry[] entryArray = new Map.Entry[prime];
|
||||
Array.Copy((Array) this._entries, 0, (Array) entryArray, 0, this._count);
|
||||
Array.Copy((Array)this._entries, 0, (Array)entryArray, 0, this._count);
|
||||
for (int index1 = 0; index1 < this._count; ++index1)
|
||||
{
|
||||
int index2 = entryArray[index1].hashCode % prime;
|
||||
@@ -160,8 +160,8 @@ public class Map
|
||||
this._entries[index2].next = this._entries[index3].next;
|
||||
this._entries[index3].hashCode = -1;
|
||||
this._entries[index3].next = this._freeList;
|
||||
this._entries[index3].key = (object) null;
|
||||
this._entries[index3].value = (object) null;
|
||||
this._entries[index3].key = (object)null;
|
||||
this._entries[index3].value = (object)null;
|
||||
this._freeList = index3;
|
||||
++this._freeCount;
|
||||
++this._version;
|
||||
@@ -181,7 +181,7 @@ public class Map
|
||||
value = this._entries[entry].value;
|
||||
return true;
|
||||
}
|
||||
value = (object) null;
|
||||
value = (object)null;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -201,14 +201,14 @@ public class Map
|
||||
this._dictionary = dictionary;
|
||||
this._version = this._dictionary._version;
|
||||
this._index = 0;
|
||||
this._current = new KeyValueEntry<object, object>((object) null, (object) null);
|
||||
this._current = new KeyValueEntry<object, object>((object)null, (object)null);
|
||||
}
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this._version != this._dictionary._version)
|
||||
throw new InvalidOperationException("Dictionary was modified while enumerating");
|
||||
for (; (uint) this._index < (uint) this._dictionary._count; ++this._index)
|
||||
for (; (uint)this._index < (uint)this._dictionary._count; ++this._index)
|
||||
{
|
||||
if (this._dictionary._entries[this._index].hashCode >= 0)
|
||||
{
|
||||
@@ -218,7 +218,7 @@ public class Map
|
||||
}
|
||||
}
|
||||
this._index = this._dictionary._count + 1;
|
||||
this._current = new KeyValueEntry<object, object>((object) null, (object) null);
|
||||
this._current = new KeyValueEntry<object, object>((object)null, (object)null);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ public class Map
|
||||
{
|
||||
private Map _dictionary;
|
||||
|
||||
public KeyCollection(Map dictionary) => this._dictionary = dictionary != null ? dictionary : throw new ArgumentNullException(nameof (dictionary));
|
||||
public KeyCollection(Map dictionary) => this._dictionary = dictionary != null ? dictionary : throw new ArgumentNullException(nameof(dictionary));
|
||||
|
||||
public Map.KeyCollection.Enumerator GetEnumerator() => new Map.KeyCollection.Enumerator(this._dictionary);
|
||||
|
||||
@@ -247,14 +247,14 @@ public class Map
|
||||
this._dictionary = dictionary;
|
||||
this._version = dictionary._version;
|
||||
this._index = 0;
|
||||
this._currentKey = (object) null;
|
||||
this._currentKey = (object)null;
|
||||
}
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this._version != this._dictionary._version)
|
||||
throw new InvalidOperationException("Dictionary was modified while enumerating");
|
||||
for (; (uint) this._index < (uint) this._dictionary._count; ++this._index)
|
||||
for (; (uint)this._index < (uint)this._dictionary._count; ++this._index)
|
||||
{
|
||||
if (this._dictionary._entries[this._index].hashCode >= 0)
|
||||
{
|
||||
@@ -264,7 +264,7 @@ public class Map
|
||||
}
|
||||
}
|
||||
this._index = this._dictionary._count + 1;
|
||||
this._currentKey = (object) null;
|
||||
this._currentKey = (object)null;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ public class Map
|
||||
{
|
||||
private Map _dictionary;
|
||||
|
||||
public ValueCollection(Map dictionary) => this._dictionary = dictionary != null ? dictionary : throw new ArgumentNullException(nameof (dictionary));
|
||||
public ValueCollection(Map dictionary) => this._dictionary = dictionary != null ? dictionary : throw new ArgumentNullException(nameof(dictionary));
|
||||
|
||||
public Map.ValueCollection.Enumerator GetEnumerator() => new Map.ValueCollection.Enumerator(this._dictionary);
|
||||
|
||||
@@ -294,14 +294,14 @@ public class Map
|
||||
this._dictionary = dictionary;
|
||||
this._version = dictionary._version;
|
||||
this._index = 0;
|
||||
this._currentValue = (object) null;
|
||||
this._currentValue = (object)null;
|
||||
}
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this._version != this._dictionary._version)
|
||||
throw new InvalidOperationException("Dictionary was modified while enumerating");
|
||||
for (; (uint) this._index < (uint) this._dictionary._count; ++this._index)
|
||||
for (; (uint)this._index < (uint)this._dictionary._count; ++this._index)
|
||||
{
|
||||
if (this._dictionary._entries[this._index].hashCode >= 0)
|
||||
{
|
||||
@@ -311,7 +311,7 @@ public class Map
|
||||
}
|
||||
}
|
||||
this._index = this._dictionary._count + 1;
|
||||
this._currentValue = (object) null;
|
||||
this._currentValue = (object)null;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+18
-18
@@ -39,7 +39,7 @@ public class Map<K, V>
|
||||
get
|
||||
{
|
||||
int entry = this.FindEntry(key);
|
||||
return entry >= 0 ? this._entries[entry].value : default (V);
|
||||
return entry >= 0 ? this._entries[entry].value : default(V);
|
||||
}
|
||||
set => this.Insert(key, value, false);
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public class Map<K, V>
|
||||
return;
|
||||
for (int index = 0; index < this._buckets.Length; ++index)
|
||||
this._buckets[index] = -1;
|
||||
Array.Clear((Array) this._entries, 0, this._count);
|
||||
Array.Clear((Array)this._entries, 0, this._count);
|
||||
this._freeList = -1;
|
||||
this._count = 0;
|
||||
this._freeCount = 0;
|
||||
@@ -132,7 +132,7 @@ public class Map<K, V>
|
||||
for (int index = 0; index < numArray.Length; ++index)
|
||||
numArray[index] = -1;
|
||||
Map<K, V>.Entry[] entryArray = new Map<K, V>.Entry[prime];
|
||||
Array.Copy((Array) this._entries, 0, (Array) entryArray, 0, this._count);
|
||||
Array.Copy((Array)this._entries, 0, (Array)entryArray, 0, this._count);
|
||||
for (int index1 = 0; index1 < this._count; ++index1)
|
||||
{
|
||||
int index2 = entryArray[index1].hashCode % prime;
|
||||
@@ -160,8 +160,8 @@ public class Map<K, V>
|
||||
this._entries[index2].next = this._entries[index3].next;
|
||||
this._entries[index3].hashCode = -1;
|
||||
this._entries[index3].next = this._freeList;
|
||||
this._entries[index3].key = default (K);
|
||||
this._entries[index3].value = default (V);
|
||||
this._entries[index3].key = default(K);
|
||||
this._entries[index3].value = default(V);
|
||||
this._freeList = index3;
|
||||
++this._freeCount;
|
||||
++this._version;
|
||||
@@ -181,11 +181,11 @@ public class Map<K, V>
|
||||
value = this._entries[entry].value;
|
||||
return true;
|
||||
}
|
||||
value = default (V);
|
||||
value = default(V);
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool KeyEquals(K x, K y) => x.Equals((object) y);
|
||||
private bool KeyEquals(K x, K y) => x.Equals((object)y);
|
||||
|
||||
private int GetKeyHashCode(K obj) => obj.GetHashCode();
|
||||
|
||||
@@ -201,14 +201,14 @@ public class Map<K, V>
|
||||
this._dictionary = dictionary;
|
||||
this._version = this._dictionary._version;
|
||||
this._index = 0;
|
||||
this._current = new KeyValueEntry<K, V>(default (K), default (V));
|
||||
this._current = new KeyValueEntry<K, V>(default(K), default(V));
|
||||
}
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this._version != this._dictionary._version)
|
||||
throw new InvalidOperationException("Dictionary was modified while enumerating");
|
||||
for (; (uint) this._index < (uint) this._dictionary._count; ++this._index)
|
||||
for (; (uint)this._index < (uint)this._dictionary._count; ++this._index)
|
||||
{
|
||||
if (this._dictionary._entries[this._index].hashCode >= 0)
|
||||
{
|
||||
@@ -218,7 +218,7 @@ public class Map<K, V>
|
||||
}
|
||||
}
|
||||
this._index = this._dictionary._count + 1;
|
||||
this._current = new KeyValueEntry<K, V>(default (K), default (V));
|
||||
this._current = new KeyValueEntry<K, V>(default(K), default(V));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ public class Map<K, V>
|
||||
{
|
||||
private Map<K, V> _dictionary;
|
||||
|
||||
public KeyCollection(Map<K, V> dictionary) => this._dictionary = dictionary != null ? dictionary : throw new ArgumentNullException(nameof (dictionary));
|
||||
public KeyCollection(Map<K, V> dictionary) => this._dictionary = dictionary != null ? dictionary : throw new ArgumentNullException(nameof(dictionary));
|
||||
|
||||
public Map<K, V>.KeyCollection.Enumerator GetEnumerator() => new Map<K, V>.KeyCollection.Enumerator(this._dictionary);
|
||||
|
||||
@@ -247,14 +247,14 @@ public class Map<K, V>
|
||||
this._dictionary = dictionary;
|
||||
this._version = dictionary._version;
|
||||
this._index = 0;
|
||||
this._currentKey = default (K);
|
||||
this._currentKey = default(K);
|
||||
}
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this._version != this._dictionary._version)
|
||||
throw new InvalidOperationException("Dictionary was modified while enumerating");
|
||||
for (; (uint) this._index < (uint) this._dictionary._count; ++this._index)
|
||||
for (; (uint)this._index < (uint)this._dictionary._count; ++this._index)
|
||||
{
|
||||
if (this._dictionary._entries[this._index].hashCode >= 0)
|
||||
{
|
||||
@@ -264,7 +264,7 @@ public class Map<K, V>
|
||||
}
|
||||
}
|
||||
this._index = this._dictionary._count + 1;
|
||||
this._currentKey = default (K);
|
||||
this._currentKey = default(K);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ public class Map<K, V>
|
||||
{
|
||||
private Map<K, V> _dictionary;
|
||||
|
||||
public ValueCollection(Map<K, V> dictionary) => this._dictionary = dictionary != null ? dictionary : throw new ArgumentNullException(nameof (dictionary));
|
||||
public ValueCollection(Map<K, V> dictionary) => this._dictionary = dictionary != null ? dictionary : throw new ArgumentNullException(nameof(dictionary));
|
||||
|
||||
public Map<K, V>.ValueCollection.Enumerator GetEnumerator() => new Map<K, V>.ValueCollection.Enumerator(this._dictionary);
|
||||
|
||||
@@ -294,14 +294,14 @@ public class Map<K, V>
|
||||
this._dictionary = dictionary;
|
||||
this._version = dictionary._version;
|
||||
this._index = 0;
|
||||
this._currentValue = default (V);
|
||||
this._currentValue = default(V);
|
||||
}
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
if (this._version != this._dictionary._version)
|
||||
throw new InvalidOperationException("Dictionary was modified while enumerating");
|
||||
for (; (uint) this._index < (uint) this._dictionary._count; ++this._index)
|
||||
for (; (uint)this._index < (uint)this._dictionary._count; ++this._index)
|
||||
{
|
||||
if (this._dictionary._entries[this._index].hashCode >= 0)
|
||||
{
|
||||
@@ -311,7 +311,7 @@ public class Map<K, V>
|
||||
}
|
||||
}
|
||||
this._index = this._dictionary._count + 1;
|
||||
this._currentValue = default (V);
|
||||
this._currentValue = default(V);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Microsoft.Iris.Input
|
||||
case CursorID.Wait:
|
||||
return Cursor.WaitCursor;
|
||||
default:
|
||||
return (Cursor) null;
|
||||
return (Cursor)null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Microsoft.Iris.Libraries.OS
|
||||
|
||||
private static RegistryKey OpenWorker(IntPtr parentKey, string path)
|
||||
{
|
||||
RegistryKey registryKey = (RegistryKey) null;
|
||||
RegistryKey registryKey = (RegistryKey)null;
|
||||
IntPtr phkResult;
|
||||
if (Win32Api.RegOpenKeyExW(parentKey, path, 0, 131097, out phkResult) == 0)
|
||||
registryKey = new RegistryKey(phkResult);
|
||||
@@ -38,11 +38,11 @@ namespace Microsoft.Iris.Libraries.OS
|
||||
public bool ReadByte(string valueName, out byte value)
|
||||
{
|
||||
bool flag = false;
|
||||
value = (byte) 0;
|
||||
value = (byte)0;
|
||||
int num = 0;
|
||||
if (this.ReadInt(valueName, out num) && num >= 0 && num <= (int) byte.MaxValue)
|
||||
if (this.ReadInt(valueName, out num) && num >= 0 && num <= (int)byte.MaxValue)
|
||||
{
|
||||
value = (byte) num;
|
||||
value = (byte)num;
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
@@ -79,17 +79,17 @@ namespace Microsoft.Iris.Libraries.OS
|
||||
public bool ReadString(string valueName, out string value)
|
||||
{
|
||||
bool flag = false;
|
||||
value = (string) null;
|
||||
value = (string)null;
|
||||
int lpcbData = 0;
|
||||
int lpType;
|
||||
if (Win32Api.RegQueryValueExW(this._hkey, valueName, IntPtr.Zero, out lpType, (char[]) null, ref lpcbData) == 0 && lpType == 1)
|
||||
if (Win32Api.RegQueryValueExW(this._hkey, valueName, IntPtr.Zero, out lpType, (char[])null, ref lpcbData) == 0 && lpType == 1)
|
||||
flag = this.ReadStringValueWorker(valueName, lpcbData, out value);
|
||||
return flag;
|
||||
}
|
||||
|
||||
private bool ReadStringValueWorker(string valueName, int dataBytes, out string value)
|
||||
{
|
||||
value = (string) null;
|
||||
value = (string)null;
|
||||
bool flag = false;
|
||||
int length = dataBytes / 2;
|
||||
char[] lpData = new char[length];
|
||||
@@ -108,7 +108,7 @@ namespace Microsoft.Iris.Libraries.OS
|
||||
{
|
||||
Win32Api.RegCloseKey(this._hkey);
|
||||
this._hkey = IntPtr.Zero;
|
||||
GC.SuppressFinalize((object) this);
|
||||
GC.SuppressFinalize((object)this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,13 +12,13 @@ namespace Microsoft.Iris.Library
|
||||
{
|
||||
public static class InvariantString
|
||||
{
|
||||
public static string Format(string format, object param) => string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param);
|
||||
public static string Format(string format, object param) => string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param);
|
||||
|
||||
public static string Format(string format, object[] param) => throw new Exception("Should never format with object array. Use one of the dedicated format methods");
|
||||
|
||||
public static string Format(string format, object param1, object param2) => string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2);
|
||||
public static string Format(string format, object param1, object param2) => string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2);
|
||||
|
||||
public static string Format(string format, object param1, object param2, object param3) => string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3);
|
||||
public static string Format(string format, object param1, object param2, object param3) => string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3);
|
||||
|
||||
public static string Format(
|
||||
string format,
|
||||
@@ -27,7 +27,7 @@ namespace Microsoft.Iris.Library
|
||||
object param3,
|
||||
object param4)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4);
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
@@ -38,7 +38,7 @@ namespace Microsoft.Iris.Library
|
||||
object param4,
|
||||
object param5)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5);
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
@@ -50,7 +50,7 @@ namespace Microsoft.Iris.Library
|
||||
object param5,
|
||||
object param6)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6);
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
@@ -63,7 +63,7 @@ namespace Microsoft.Iris.Library
|
||||
object param6,
|
||||
object param7)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7);
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
@@ -77,7 +77,7 @@ namespace Microsoft.Iris.Library
|
||||
object param7,
|
||||
object param8)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8);
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
@@ -92,7 +92,7 @@ namespace Microsoft.Iris.Library
|
||||
object param8,
|
||||
object param9)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9);
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
@@ -108,7 +108,7 @@ namespace Microsoft.Iris.Library
|
||||
object param9,
|
||||
object param10)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10);
|
||||
}
|
||||
|
||||
public static string Format(
|
||||
@@ -125,7 +125,7 @@ namespace Microsoft.Iris.Library
|
||||
object param10,
|
||||
object param11)
|
||||
{
|
||||
return string.Format((IFormatProvider) CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11);
|
||||
return string.Format((IFormatProvider)CultureInfo.InvariantCulture, format, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10, param11);
|
||||
}
|
||||
|
||||
public static bool Equals(string leftName, string rightName) => string.Compare(leftName, rightName, StringComparison.Ordinal) == 0;
|
||||
@@ -140,11 +140,11 @@ namespace Microsoft.Iris.Library
|
||||
|
||||
public static bool EndsWithI(string valueName, string suffixName) => valueName.EndsWith(suffixName, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
public static string ValueToString(ushort v, string formatName) => v.ToString(formatName, (IFormatProvider) CultureInfo.InvariantCulture);
|
||||
public static string ValueToString(ushort v, string formatName) => v.ToString(formatName, (IFormatProvider)CultureInfo.InvariantCulture);
|
||||
|
||||
public static IEqualityComparer<string> OrdinalIgnoreCaseComparer => (IEqualityComparer<string>) InvariantString.OrdinalIgnoreCaseStringComparer.Instance;
|
||||
public static IEqualityComparer<string> OrdinalIgnoreCaseComparer => (IEqualityComparer<string>)InvariantString.OrdinalIgnoreCaseStringComparer.Instance;
|
||||
|
||||
public static IEqualityComparer<string> OrdinalComparer => (IEqualityComparer<string>) InvariantString.OrdinalStringComparer.Instance;
|
||||
public static IEqualityComparer<string> OrdinalComparer => (IEqualityComparer<string>)InvariantString.OrdinalStringComparer.Instance;
|
||||
|
||||
public class OrdinalStringComparer : IEqualityComparer<string>
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
RenderSession session,
|
||||
ExternalAnimationInput externalInput)
|
||||
{
|
||||
Debug2.Validate(externalInput != null, typeof (ArgumentNullException), nameof (externalInput));
|
||||
Debug2.Validate(externalInput != null, typeof(ArgumentNullException), nameof(externalInput));
|
||||
this.m_remoteObject = session.BuildRemoteAnimationInputProvider(this, externalInput.UniqueId);
|
||||
this.m_externalInput = externalInput;
|
||||
this.RegisterUsage(objUser);
|
||||
@@ -39,8 +39,8 @@ namespace Microsoft.Iris.Render.Animation
|
||||
{
|
||||
if (inDispose && this.m_remoteObject != null)
|
||||
this.m_remoteObject.Dispose();
|
||||
this.m_remoteObject = (RemoteAnimationInputProvider) null;
|
||||
this.m_externalInput = (ExternalAnimationInput) null;
|
||||
this.m_remoteObject = (RemoteAnimationInputProvider)null;
|
||||
this.m_externalInput = (ExternalAnimationInput)null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -50,51 +50,51 @@ namespace Microsoft.Iris.Render.Animation
|
||||
|
||||
RENDERHANDLE IRenderHandleOwner.RenderHandle => this.m_remoteObject.RenderHandle;
|
||||
|
||||
void IRenderHandleOwner.OnDisconnect() => this.m_remoteObject = (RemoteAnimationInputProvider) null;
|
||||
void IRenderHandleOwner.OnDisconnect() => this.m_remoteObject = (RemoteAnimationInputProvider)null;
|
||||
|
||||
void IAnimationInputProvider.PublishFloat(
|
||||
string propertyName,
|
||||
float value)
|
||||
{
|
||||
this.m_remoteObject.SendPublishFloat(((IAnimatableObject) this.m_externalInput).GetPropertyId(propertyName), value);
|
||||
this.m_remoteObject.SendPublishFloat(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName), value);
|
||||
}
|
||||
|
||||
void IAnimationInputProvider.PublishVector2(
|
||||
string propertyName,
|
||||
Vector2 value)
|
||||
{
|
||||
this.m_remoteObject.SendPublishVector2(((IAnimatableObject) this.m_externalInput).GetPropertyId(propertyName), value);
|
||||
this.m_remoteObject.SendPublishVector2(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName), value);
|
||||
}
|
||||
|
||||
void IAnimationInputProvider.PublishVector3(
|
||||
string propertyName,
|
||||
Vector3 value)
|
||||
{
|
||||
this.m_remoteObject.SendPublishVector3(((IAnimatableObject) this.m_externalInput).GetPropertyId(propertyName), value);
|
||||
this.m_remoteObject.SendPublishVector3(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName), value);
|
||||
}
|
||||
|
||||
void IAnimationInputProvider.PublishVector4(
|
||||
string propertyName,
|
||||
Vector4 value)
|
||||
{
|
||||
this.m_remoteObject.SendPublishVector4(((IAnimatableObject) this.m_externalInput).GetPropertyId(propertyName), value);
|
||||
this.m_remoteObject.SendPublishVector4(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName), value);
|
||||
}
|
||||
|
||||
void IAnimationInputProvider.PublishQuaternion(
|
||||
string propertyName,
|
||||
Quaternion value)
|
||||
{
|
||||
this.m_remoteObject.SendPublishQuaternion(((IAnimatableObject) this.m_externalInput).GetPropertyId(propertyName), value);
|
||||
this.m_remoteObject.SendPublishQuaternion(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName), value);
|
||||
}
|
||||
|
||||
void IAnimationInputProvider.RevokeFloat(string propertyName) => this.m_remoteObject.SendRevokeFloat(((IAnimatableObject) this.m_externalInput).GetPropertyId(propertyName));
|
||||
void IAnimationInputProvider.RevokeFloat(string propertyName) => this.m_remoteObject.SendRevokeFloat(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName));
|
||||
|
||||
void IAnimationInputProvider.RevokeVector2(string propertyName) => this.m_remoteObject.SendRevokeVector2(((IAnimatableObject) this.m_externalInput).GetPropertyId(propertyName));
|
||||
void IAnimationInputProvider.RevokeVector2(string propertyName) => this.m_remoteObject.SendRevokeVector2(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName));
|
||||
|
||||
void IAnimationInputProvider.RevokeVector3(string propertyName) => this.m_remoteObject.SendRevokeVector3(((IAnimatableObject) this.m_externalInput).GetPropertyId(propertyName));
|
||||
void IAnimationInputProvider.RevokeVector3(string propertyName) => this.m_remoteObject.SendRevokeVector3(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName));
|
||||
|
||||
void IAnimationInputProvider.RevokeVector4(string propertyName) => this.m_remoteObject.SendRevokeVector4(((IAnimatableObject) this.m_externalInput).GetPropertyId(propertyName));
|
||||
void IAnimationInputProvider.RevokeVector4(string propertyName) => this.m_remoteObject.SendRevokeVector4(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName));
|
||||
|
||||
void IAnimationInputProvider.RevokeQuaternion(string propertyName) => this.m_remoteObject.SendRevokeQuaternion(((IAnimatableObject) this.m_externalInput).GetPropertyId(propertyName));
|
||||
void IAnimationInputProvider.RevokeQuaternion(string propertyName) => this.m_remoteObject.SendRevokeQuaternion(((IAnimatableObject)this.m_externalInput).GetPropertyId(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
this.m_remoteObject = ownerSession.BuildRemoteAnimationManager(this);
|
||||
this.m_flSpeedAdjustment = 1f;
|
||||
this.m_backCompat = false;
|
||||
this.RegisterUsage((object) ownerSession);
|
||||
this.RegisterUsage((object)ownerSession);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool inDispose)
|
||||
@@ -35,8 +35,8 @@ namespace Microsoft.Iris.Render.Animation
|
||||
{
|
||||
if (inDispose && this.m_remoteObject != null)
|
||||
this.m_remoteObject.Dispose();
|
||||
this.m_ownerSession = (RenderSession) null;
|
||||
this.m_remoteObject = (RemoteAnimationManager) null;
|
||||
this.m_ownerSession = (RenderSession)null;
|
||||
this.m_remoteObject = (RemoteAnimationManager)null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -56,20 +56,20 @@ namespace Microsoft.Iris.Render.Animation
|
||||
object objUser,
|
||||
AnimationInput initialValue)
|
||||
{
|
||||
Debug2.Validate(objUser != null, typeof (ArgumentNullException), nameof (objUser));
|
||||
Debug2.Validate(initialValue != null, typeof (ArgumentNullException), nameof (initialValue));
|
||||
Debug2.Validate(objUser != null, typeof(ArgumentNullException), nameof(objUser));
|
||||
Debug2.Validate(initialValue != null, typeof(ArgumentNullException), nameof(initialValue));
|
||||
KeyframeAnimation keyframeAnimation = new KeyframeAnimation(this, initialValue);
|
||||
keyframeAnimation.RegisterUsage(objUser);
|
||||
return (IKeyframeAnimation) keyframeAnimation;
|
||||
return (IKeyframeAnimation)keyframeAnimation;
|
||||
}
|
||||
|
||||
IAnimationGroup IAnimationSystem.CreateAnimationGroup(
|
||||
object objUser)
|
||||
{
|
||||
Debug2.Validate(objUser != null, typeof (ArgumentNullException), nameof (objUser));
|
||||
Debug2.Validate(objUser != null, typeof(ArgumentNullException), nameof(objUser));
|
||||
AnimationGroup animationGroup = new AnimationGroup(this);
|
||||
animationGroup.RegisterUsage(objUser);
|
||||
return (IAnimationGroup) animationGroup;
|
||||
return (IAnimationGroup)animationGroup;
|
||||
}
|
||||
|
||||
void IAnimationSystem.PulseTimeAdvance(int nAdvanceMs) => this.PulseTimeAdvance(nAdvanceMs);
|
||||
@@ -102,7 +102,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
object objUser,
|
||||
IAnimationPropertyMap propertyMap)
|
||||
{
|
||||
return (IExternalAnimationInput) new ExternalAnimationInput(objUser, this.m_ownerSession, propertyMap);
|
||||
return (IExternalAnimationInput)new ExternalAnimationInput(objUser, this.m_ownerSession, propertyMap);
|
||||
}
|
||||
|
||||
void IAnimationSystem.PauseAnimations() => this.m_remoteObject.SendSetGlobalSpeedAdjustment(0.0f);
|
||||
@@ -113,17 +113,17 @@ namespace Microsoft.Iris.Render.Animation
|
||||
|
||||
RENDERHANDLE IRenderHandleOwner.RenderHandle => this.m_remoteObject.RenderHandle;
|
||||
|
||||
void IRenderHandleOwner.OnDisconnect() => this.m_remoteObject = (RemoteAnimationManager) null;
|
||||
void IRenderHandleOwner.OnDisconnect() => this.m_remoteObject = (RemoteAnimationManager)null;
|
||||
|
||||
protected override void Invariant()
|
||||
{
|
||||
Debug2.Validate(this.m_remoteObject.IsValid, typeof (InvalidOperationException), "RemoteAnimationManager must be connected");
|
||||
Debug2.Validate(this.m_remoteObject.IsValid, typeof(InvalidOperationException), "RemoteAnimationManager must be connected");
|
||||
this.m_ownerSession.AssertOwningThread();
|
||||
}
|
||||
|
||||
private void PulseTimeAdvance(int nAdvanceMs)
|
||||
{
|
||||
Debug2.Validate(nAdvanceMs > 0, typeof (ArgumentOutOfRangeException), "advanceTime");
|
||||
Debug2.Validate(nAdvanceMs > 0, typeof(ArgumentOutOfRangeException), "advanceTime");
|
||||
this.m_remoteObject.SendPulseTimeAdvance(nAdvanceMs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ namespace Microsoft.Iris.Render.Animation
|
||||
|
||||
internal AnimationTarget(IAnimatableObject targetObject, string targetPropertyName)
|
||||
{
|
||||
int propertyType = (int) targetObject.GetPropertyType(targetPropertyName);
|
||||
targetObject.RegisterUsage((object) this);
|
||||
int propertyType = (int)targetObject.GetPropertyType(targetPropertyName);
|
||||
targetObject.RegisterUsage((object)this);
|
||||
this.m_targetId = Interlocked.Increment(ref AnimationTarget.s_targetIdSeed);
|
||||
this.m_object = targetObject;
|
||||
this.m_property = targetPropertyName;
|
||||
@@ -30,8 +30,8 @@ namespace Microsoft.Iris.Render.Animation
|
||||
try
|
||||
{
|
||||
if (fInDispose)
|
||||
this.m_object.UnregisterUsage((object) this);
|
||||
this.m_object = (IAnimatableObject) null;
|
||||
this.m_object.UnregisterUsage((object)this);
|
||||
this.m_object = (IAnimatableObject)null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace Microsoft.Iris.Render.Animation
|
||||
RenderSession session,
|
||||
IAnimationPropertyMap propertyMap)
|
||||
{
|
||||
Debug2.Validate(objUser != null, typeof (ArgumentNullException), nameof (objUser));
|
||||
Debug2.Validate(propertyMap != null, typeof (ArgumentNullException), nameof (propertyMap));
|
||||
Debug2.Validate(objUser != null, typeof(ArgumentNullException), nameof(objUser));
|
||||
Debug2.Validate(propertyMap != null, typeof(ArgumentNullException), nameof(propertyMap));
|
||||
this.m_uniqueId = ExternalAnimationInput.s_uniqueIdSeed++;
|
||||
this.m_propertyMap = propertyMap;
|
||||
this.m_session = session;
|
||||
@@ -46,9 +46,9 @@ namespace Microsoft.Iris.Render.Animation
|
||||
{
|
||||
if (inDispose && this.m_remoteObject != null)
|
||||
this.m_remoteObject.Dispose();
|
||||
this.m_remoteObject = (RemoteExternalAnimationInput) null;
|
||||
this.m_propertyMap = (IAnimationPropertyMap) null;
|
||||
this.m_session = (RenderSession) null;
|
||||
this.m_remoteObject = (RemoteExternalAnimationInput)null;
|
||||
this.m_propertyMap = (IAnimationPropertyMap)null;
|
||||
this.m_session = (RenderSession)null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -63,7 +63,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
void IRenderHandleOwner.OnDisconnect()
|
||||
{
|
||||
this.m_uniqueId = 0U;
|
||||
this.m_remoteObject = (RemoteExternalAnimationInput) null;
|
||||
this.m_remoteObject = (RemoteExternalAnimationInput)null;
|
||||
}
|
||||
|
||||
RENDERHANDLE IAnimatableObject.GetObjectId() => this.m_remoteObject.RenderHandle;
|
||||
@@ -79,7 +79,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
IAnimationInputProvider IExternalAnimationInput.CreateProvider(
|
||||
object objUser)
|
||||
{
|
||||
return (IAnimationInputProvider) new AnimationInputProvider(objUser, this.m_session, this);
|
||||
return (IAnimationInputProvider)new AnimationInputProvider(objUser, this.m_session, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,18 +39,18 @@ namespace Microsoft.Iris.Render.Animation
|
||||
internal KeyframeAnimation(AnimationSystem owner, AnimationInput initialValue)
|
||||
{
|
||||
this.m_animationSystem = owner;
|
||||
this.m_reference = (AnimationInput) null;
|
||||
this.m_scale = (AnimationInput) null;
|
||||
this.m_reference = (AnimationInput)null;
|
||||
this.m_scale = (AnimationInput)null;
|
||||
this.m_animationType = initialValue.InputType;
|
||||
this.m_keyframeList = new Vector();
|
||||
this.m_repeatCount = 0;
|
||||
this.m_autoReset = false;
|
||||
this.m_resetBehavior = AnimationResetBehavior.LeaveCurrent;
|
||||
this.m_animationSystem.RegisterUsage((object) this);
|
||||
this.m_animationSystem.RegisterUsage((object)this);
|
||||
this.m_remoteObject = owner.Session.BuildRemoteAnimation(this, this.m_animationType);
|
||||
if (this.m_animationSystem.BackCompat)
|
||||
return;
|
||||
this.AddKeyframe(new AnimationKeyframe(0.0f, initialValue, (AnimationInterpolation) KeyframeAnimation.s_defaultInterpolation));
|
||||
this.AddKeyframe(new AnimationKeyframe(0.0f, initialValue, (AnimationInterpolation)KeyframeAnimation.s_defaultInterpolation));
|
||||
}
|
||||
|
||||
protected override void Dispose(bool inDispose)
|
||||
@@ -64,18 +64,18 @@ namespace Microsoft.Iris.Render.Animation
|
||||
if (this.m_keyframeList != null)
|
||||
{
|
||||
foreach (AnimationKeyframe keyframe in this.m_keyframeList)
|
||||
keyframe.Value.UnregisterUsage((object) this);
|
||||
keyframe.Value.UnregisterUsage((object)this);
|
||||
this.m_keyframeList.Clear();
|
||||
}
|
||||
if (this.m_remoteObject != null)
|
||||
this.m_remoteObject.Dispose();
|
||||
this.m_animationSystem.UnregisterUsage((object) this);
|
||||
this.m_animationSystem.UnregisterUsage((object)this);
|
||||
}
|
||||
this.m_remoteObject = (RemoteAnimation) null;
|
||||
this.m_reference = (AnimationInput) null;
|
||||
this.m_keyframeList = (Vector) null;
|
||||
this.m_targetList = (Vector) null;
|
||||
this.m_animationSystem = (AnimationSystem) null;
|
||||
this.m_remoteObject = (RemoteAnimation)null;
|
||||
this.m_reference = (AnimationInput)null;
|
||||
this.m_keyframeList = (Vector)null;
|
||||
this.m_targetList = (Vector)null;
|
||||
this.m_animationSystem = (AnimationSystem)null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -146,7 +146,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
|
||||
public override void InstantAdvance(float advanceTime)
|
||||
{
|
||||
Debug2.Validate((double) advanceTime >= 0.0, typeof (ArgumentOutOfRangeException), nameof (advanceTime));
|
||||
Debug2.Validate((double)advanceTime >= 0.0, typeof(ArgumentOutOfRangeException), nameof(advanceTime));
|
||||
this.m_remoteObject.SendInstantAdvance(advanceTime);
|
||||
}
|
||||
|
||||
@@ -180,13 +180,13 @@ namespace Microsoft.Iris.Render.Animation
|
||||
|
||||
void IKeyframeAnimation.AddKeyframe(AnimationKeyframe keyframe)
|
||||
{
|
||||
Debug2.Validate(keyframe != null, typeof (ArgumentNullException), nameof (keyframe));
|
||||
Debug2.Validate(keyframe != null, typeof(ArgumentNullException), nameof(keyframe));
|
||||
this.AddKeyframe(keyframe);
|
||||
}
|
||||
|
||||
internal void AddKeyframe(AnimationKeyframe keyframe)
|
||||
{
|
||||
this.m_keyframeList.Add((object) keyframe);
|
||||
this.m_keyframeList.Add((object)keyframe);
|
||||
this.m_remoteObject.SendAddKeyframe(this.m_keyframeList.Count - 1, keyframe.Time);
|
||||
this.SetKeyframe(this.m_keyframeList.Count - 1, keyframe, false);
|
||||
}
|
||||
@@ -194,7 +194,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
AnimationKeyframe IKeyframeAnimation.GetKeyframe(
|
||||
int keyframeIndex)
|
||||
{
|
||||
Debug2.Validate(keyframeIndex >= 0 || keyframeIndex < this.m_keyframeList.Count, typeof (ArgumentOutOfRangeException), nameof (keyframeIndex));
|
||||
Debug2.Validate(keyframeIndex >= 0 || keyframeIndex < this.m_keyframeList.Count, typeof(ArgumentOutOfRangeException), nameof(keyframeIndex));
|
||||
return this.GetKeyframe(keyframeIndex);
|
||||
}
|
||||
|
||||
@@ -204,22 +204,22 @@ namespace Microsoft.Iris.Render.Animation
|
||||
int keyframeIndex,
|
||||
AnimationKeyframe keyframe)
|
||||
{
|
||||
Debug2.Validate(keyframe != null, typeof (ArgumentNullException), nameof (keyframe));
|
||||
Debug2.Validate(keyframeIndex >= 0 || keyframeIndex < this.m_keyframeList.Count, typeof (ArgumentOutOfRangeException), nameof (keyframeIndex));
|
||||
Debug2.Validate(keyframe != null, typeof(ArgumentNullException), nameof(keyframe));
|
||||
Debug2.Validate(keyframeIndex >= 0 || keyframeIndex < this.m_keyframeList.Count, typeof(ArgumentOutOfRangeException), nameof(keyframeIndex));
|
||||
if (keyframeIndex == 0 && !this.m_animationSystem.BackCompat)
|
||||
Debug2.Validate((double) keyframe.Time == 0.0, typeof (ArgumentException), "Cannot change the time for keyframe 0");
|
||||
Debug2.Validate((double)keyframe.Time == 0.0, typeof(ArgumentException), "Cannot change the time for keyframe 0");
|
||||
this.SetKeyframe(keyframeIndex, keyframe, true);
|
||||
}
|
||||
|
||||
internal void SetKeyframe(int keyframeIndex, AnimationKeyframe keyframe, bool replaceKeyframe)
|
||||
{
|
||||
keyframe.Value.RegisterUsage((object) this);
|
||||
keyframe.Value.RegisterUsage((object)this);
|
||||
if (replaceKeyframe)
|
||||
{
|
||||
AnimationKeyframe keyframe1 = (AnimationKeyframe) this.m_keyframeList[keyframeIndex];
|
||||
AnimationKeyframe keyframe1 = (AnimationKeyframe)this.m_keyframeList[keyframeIndex];
|
||||
this.m_keyframeList.RemoveAt(keyframeIndex);
|
||||
this.m_keyframeList.Insert(keyframeIndex, (object) keyframe);
|
||||
keyframe1.Value.UnregisterUsage((object) this);
|
||||
this.m_keyframeList.Insert(keyframeIndex, (object)keyframe);
|
||||
keyframe1.Value.UnregisterUsage((object)this);
|
||||
}
|
||||
this.m_remoteObject.SendSetKeyframeTime(keyframeIndex, keyframe.Time);
|
||||
this.SendInput(keyframeIndex, keyframe.Value);
|
||||
@@ -230,8 +230,8 @@ namespace Microsoft.Iris.Render.Animation
|
||||
IAnimatable targetObject,
|
||||
string targetPropertyName)
|
||||
{
|
||||
Debug2.Validate(targetObject is IAnimatableObject, typeof (ArgumentException), nameof (targetObject));
|
||||
this.AddTarget((IAnimatableObject) targetObject, targetPropertyName, (string) null);
|
||||
Debug2.Validate(targetObject is IAnimatableObject, typeof(ArgumentException), nameof(targetObject));
|
||||
this.AddTarget((IAnimatableObject)targetObject, targetPropertyName, (string)null);
|
||||
}
|
||||
|
||||
void IKeyframeAnimation.AddTarget(
|
||||
@@ -239,8 +239,8 @@ namespace Microsoft.Iris.Render.Animation
|
||||
string targetPropertyName,
|
||||
string targetMask)
|
||||
{
|
||||
Debug2.Validate(targetObject is IAnimatableObject, typeof (ArgumentException), nameof (targetObject));
|
||||
this.AddTarget((IAnimatableObject) targetObject, targetPropertyName, targetMask);
|
||||
Debug2.Validate(targetObject is IAnimatableObject, typeof(ArgumentException), nameof(targetObject));
|
||||
this.AddTarget((IAnimatableObject)targetObject, targetPropertyName, targetMask);
|
||||
}
|
||||
|
||||
internal void AddTarget(
|
||||
@@ -248,20 +248,20 @@ namespace Microsoft.Iris.Render.Animation
|
||||
string targetPropertyName,
|
||||
string targetMaskSpec)
|
||||
{
|
||||
Debug2.Validate(targetObject != null, typeof (ArgumentNullException), nameof (targetObject));
|
||||
Debug2.Validate(targetPropertyName != null, typeof (ArgumentNullException), nameof (targetPropertyName));
|
||||
Debug2.Validate(!(targetObject is IAnimation), typeof (ArgumentException), "Animations can't be set as animation targets");
|
||||
Debug2.Validate(targetObject != null, typeof(ArgumentNullException), nameof(targetObject));
|
||||
Debug2.Validate(targetPropertyName != null, typeof(ArgumentNullException), nameof(targetPropertyName));
|
||||
Debug2.Validate(!(targetObject is IAnimation), typeof(ArgumentException), "Animations can't be set as animation targets");
|
||||
AnimationTarget target = new AnimationTarget(targetObject, targetPropertyName);
|
||||
AnimationTypeMask sourceMask = AnimationTypeMask.FromString(targetMaskSpec);
|
||||
if (!sourceMask.CanMapFromType(this.m_animationType))
|
||||
throw new ArgumentException(string.Format("Mask cannot be applied to a {0} animation", (object) this.m_animationType));
|
||||
throw new ArgumentException(string.Format("Mask cannot be applied to a {0} animation", (object)this.m_animationType));
|
||||
if (!sourceMask.CanMapToType(target.TargetPropertyType))
|
||||
throw new ArgumentException(string.Format("Mask cannot be applied to a property of type {0}", (object) target.TargetPropertyType));
|
||||
throw new ArgumentException(string.Format("Mask cannot be applied to a property of type {0}", (object)target.TargetPropertyType));
|
||||
uint propertyInfo = this.GeneratePropertyInfo(target.TargetPropertyType, sourceMask);
|
||||
this.m_remoteObject.SendAddTarget(target.TargetId, target.TargetObject.GetObjectId(), target.TargetObject.GetPropertyId(target.TargetPropertyName), propertyInfo);
|
||||
if (this.m_targetList == null)
|
||||
this.m_targetList = new Vector();
|
||||
this.m_targetList.Add((object) new KeyframeAnimation.AnimationTargetInfo(target, targetMaskSpec));
|
||||
this.m_targetList.Add((object)new KeyframeAnimation.AnimationTargetInfo(target, targetMaskSpec));
|
||||
}
|
||||
|
||||
void IKeyframeAnimation.RemoveTarget(
|
||||
@@ -269,9 +269,9 @@ namespace Microsoft.Iris.Render.Animation
|
||||
string targetPropertyName,
|
||||
string targetMaskSpec)
|
||||
{
|
||||
Debug2.Validate(targetObject != null, typeof (ArgumentNullException), nameof (targetObject));
|
||||
Debug2.Validate(targetPropertyName != null, typeof (ArgumentNullException), nameof (targetPropertyName));
|
||||
KeyframeAnimation.AnimationTargetInfo animationTargetInfo = (KeyframeAnimation.AnimationTargetInfo) null;
|
||||
Debug2.Validate(targetObject != null, typeof(ArgumentNullException), nameof(targetObject));
|
||||
Debug2.Validate(targetPropertyName != null, typeof(ArgumentNullException), nameof(targetPropertyName));
|
||||
KeyframeAnimation.AnimationTargetInfo animationTargetInfo = (KeyframeAnimation.AnimationTargetInfo)null;
|
||||
if (this.m_targetList != null)
|
||||
{
|
||||
foreach (KeyframeAnimation.AnimationTargetInfo target in this.m_targetList)
|
||||
@@ -286,7 +286,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
if (animationTargetInfo == null)
|
||||
return;
|
||||
this.m_remoteObject.SendRemoveTarget(animationTargetInfo.Target.TargetId);
|
||||
this.m_targetList.Remove((object) animationTargetInfo);
|
||||
this.m_targetList.Remove((object)animationTargetInfo);
|
||||
animationTargetInfo.Target.Dispose();
|
||||
}
|
||||
|
||||
@@ -308,8 +308,8 @@ namespace Microsoft.Iris.Render.Animation
|
||||
AnimationStage animationStage,
|
||||
AnimationEvent animationEvent)
|
||||
{
|
||||
Debug2.Validate(animationEvent != null, typeof (ArgumentNullException), nameof (animationEvent));
|
||||
Debug2.Validate(animationStage < AnimationStage.Count, typeof (ArgumentException), "invalid animation stage");
|
||||
Debug2.Validate(animationEvent != null, typeof(ArgumentNullException), nameof(animationEvent));
|
||||
Debug2.Validate(animationStage < AnimationStage.Count, typeof(ArgumentException), "invalid animation stage");
|
||||
RENDERHANDLE targetObjectId = animationEvent.TargetObjectId;
|
||||
if (!(targetObjectId != RENDERHANDLE.NULL))
|
||||
return;
|
||||
@@ -320,8 +320,8 @@ namespace Microsoft.Iris.Render.Animation
|
||||
float absoluteTime,
|
||||
AnimationEvent animationEvent)
|
||||
{
|
||||
Debug2.Validate(animationEvent != null, typeof (ArgumentNullException), nameof (animationEvent));
|
||||
Debug2.Validate((double) absoluteTime >= 0.0, typeof (ArgumentException), "absoluteTime value must be >= 0.0f");
|
||||
Debug2.Validate(animationEvent != null, typeof(ArgumentNullException), nameof(animationEvent));
|
||||
Debug2.Validate((double)absoluteTime >= 0.0, typeof(ArgumentException), "absoluteTime value must be >= 0.0f");
|
||||
RENDERHANDLE targetObjectId = animationEvent.TargetObjectId;
|
||||
if (!(targetObjectId != RENDERHANDLE.NULL))
|
||||
return;
|
||||
@@ -332,8 +332,8 @@ namespace Microsoft.Iris.Render.Animation
|
||||
float progress,
|
||||
AnimationEvent animationEvent)
|
||||
{
|
||||
Debug2.Validate(animationEvent != null, typeof (ArgumentNullException), nameof (animationEvent));
|
||||
Debug2.Validate((double) progress >= 0.0 && (double) progress <= 1.0, typeof (ArgumentException), "'progress' value must be between 0.0f and 1.0f");
|
||||
Debug2.Validate(animationEvent != null, typeof(ArgumentNullException), nameof(animationEvent));
|
||||
Debug2.Validate((double)progress >= 0.0 && (double)progress <= 1.0, typeof(ArgumentException), "'progress' value must be between 0.0f and 1.0f");
|
||||
RENDERHANDLE targetObjectId = animationEvent.TargetObjectId;
|
||||
if (!(targetObjectId != RENDERHANDLE.NULL))
|
||||
return;
|
||||
@@ -345,9 +345,9 @@ namespace Microsoft.Iris.Render.Animation
|
||||
AnimationInput reference,
|
||||
AnimationEvent animationEvent)
|
||||
{
|
||||
Debug2.Validate(animationEvent != null, typeof (ArgumentNullException), nameof (animationEvent));
|
||||
Debug2.Validate(reference != null, typeof (ArgumentNullException), nameof (reference));
|
||||
Debug2.Validate(condition < ValueEventCondition.Count, typeof (ArgumentNullException), nameof (condition));
|
||||
Debug2.Validate(animationEvent != null, typeof(ArgumentNullException), nameof(animationEvent));
|
||||
Debug2.Validate(reference != null, typeof(ArgumentNullException), nameof(reference));
|
||||
Debug2.Validate(condition < ValueEventCondition.Count, typeof(ArgumentNullException), nameof(condition));
|
||||
RENDERHANDLE targetObjectId = animationEvent.TargetObjectId;
|
||||
if (!(targetObjectId != RENDERHANDLE.NULL))
|
||||
return;
|
||||
@@ -357,7 +357,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
|
||||
void IKeyframeAnimation.RemoveEvent(AnimationEvent animationEvent)
|
||||
{
|
||||
Debug2.Validate(animationEvent != null, typeof (ArgumentNullException), nameof (animationEvent));
|
||||
Debug2.Validate(animationEvent != null, typeof(ArgumentNullException), nameof(animationEvent));
|
||||
this.m_remoteObject.SendRemoveEvent(animationEvent.EventId);
|
||||
}
|
||||
|
||||
@@ -365,13 +365,13 @@ namespace Microsoft.Iris.Render.Animation
|
||||
|
||||
internal void RemoveAllEvents() => this.m_remoteObject.SendRemoveAllEvents();
|
||||
|
||||
RENDERHANDLE IAnimatableObject.GetObjectId() => ((IRenderHandleOwner) this).RenderHandle;
|
||||
RENDERHANDLE IAnimatableObject.GetObjectId() => ((IRenderHandleOwner)this).RenderHandle;
|
||||
|
||||
uint IAnimatableObject.GetPropertyId(string propertyName)
|
||||
{
|
||||
if (string.Compare(propertyName, Microsoft.Iris.Render.Animation.Animation.OutputProperty, StringComparison.OrdinalIgnoreCase) == 0)
|
||||
return 1;
|
||||
Debug2.Validate(false, typeof (ArgumentException), (object) "Unsupported property: {0}", (object) propertyName);
|
||||
Debug2.Validate(false, typeof(ArgumentException), (object)"Unsupported property: {0}", (object)propertyName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -380,11 +380,11 @@ namespace Microsoft.Iris.Render.Animation
|
||||
{
|
||||
if (string.Compare(propertyName, Microsoft.Iris.Render.Animation.Animation.OutputProperty, StringComparison.OrdinalIgnoreCase) == 0)
|
||||
return this.Type;
|
||||
Debug2.Validate(false, typeof (ArgumentException), (object) "Unsupported property: {0}", (object) propertyName);
|
||||
Debug2.Validate(false, typeof(ArgumentException), (object)"Unsupported property: {0}", (object)propertyName);
|
||||
return AnimationInputType.Float;
|
||||
}
|
||||
|
||||
RENDERHANDLE IActivatableObject.GetObjectId() => ((IRenderHandleOwner) this).RenderHandle;
|
||||
RENDERHANDLE IActivatableObject.GetObjectId() => ((IRenderHandleOwner)this).RenderHandle;
|
||||
|
||||
uint IActivatableObject.GetMethodId(string methodName)
|
||||
{
|
||||
@@ -398,19 +398,19 @@ namespace Microsoft.Iris.Render.Animation
|
||||
return 4;
|
||||
if (string.Compare(methodName, Microsoft.Iris.Render.Animation.Animation.NotifyMethod, StringComparison.OrdinalIgnoreCase) == 0)
|
||||
return 5;
|
||||
Debug2.Validate(false, typeof (ArgumentException), (object) "Unsupported method: {0}", (object) methodName);
|
||||
Debug2.Validate(false, typeof(ArgumentException), (object)"Unsupported method: {0}", (object)methodName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
RENDERHANDLE IRenderHandleOwner.RenderHandle => this.m_remoteObject.RenderHandle;
|
||||
|
||||
void IRenderHandleOwner.OnDisconnect() => this.m_remoteObject = (RemoteAnimation) null;
|
||||
void IRenderHandleOwner.OnDisconnect() => this.m_remoteObject = (RemoteAnimation)null;
|
||||
|
||||
private void SendInput(int keyframeIndex, AnimationInput input)
|
||||
{
|
||||
Debug2.Validate(input != null, typeof (ArgumentNullException), "keyframe.Value.InputType");
|
||||
Debug2.Validate(input.InputType == this.m_animationType, typeof (ArgumentException), "keyframe.Value.InputType");
|
||||
Debug2.Validate(input.InputType == AnimationInputType.Float || input.InputType == AnimationInputType.Vector2 || (input.InputType == AnimationInputType.Vector3 || input.InputType == AnimationInputType.Vector4) || input.InputType == AnimationInputType.Quaternion, typeof (ArgumentException), "keyframe.Value.InputType");
|
||||
Debug2.Validate(input != null, typeof(ArgumentNullException), "keyframe.Value.InputType");
|
||||
Debug2.Validate(input.InputType == this.m_animationType, typeof(ArgumentException), "keyframe.Value.InputType");
|
||||
Debug2.Validate(input.InputType == AnimationInputType.Float || input.InputType == AnimationInputType.Vector2 || (input.InputType == AnimationInputType.Vector3 || input.InputType == AnimationInputType.Vector4) || input.InputType == AnimationInputType.Quaternion, typeof(ArgumentException), "keyframe.Value.InputType");
|
||||
int num;
|
||||
switch (input)
|
||||
{
|
||||
@@ -423,7 +423,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
num = input is BinaryOperation ? 1 : 0;
|
||||
break;
|
||||
}
|
||||
System.Type exceptionType = typeof (ArgumentException);
|
||||
System.Type exceptionType = typeof(ArgumentException);
|
||||
Debug2.Validate(num != 0, exceptionType, "Invalid animation input in keyframe");
|
||||
this.m_remoteObject.SendBeginAnimationInput(keyframeIndex);
|
||||
this.SendInputWorker(keyframeIndex, input);
|
||||
@@ -435,23 +435,23 @@ namespace Microsoft.Iris.Render.Animation
|
||||
switch (input)
|
||||
{
|
||||
case ConstantAnimationInput _:
|
||||
ConstantAnimationInput constantAnimationInput = (ConstantAnimationInput) input;
|
||||
ConstantAnimationInput constantAnimationInput = (ConstantAnimationInput)input;
|
||||
switch (constantAnimationInput.InputType)
|
||||
{
|
||||
case AnimationInputType.Float:
|
||||
this.m_remoteObject.SendSetFloat(keyframeIndex, (float) constantAnimationInput.RawValue);
|
||||
this.m_remoteObject.SendSetFloat(keyframeIndex, (float)constantAnimationInput.RawValue);
|
||||
return;
|
||||
case AnimationInputType.Vector2:
|
||||
this.m_remoteObject.SendSetVector2(keyframeIndex, (Vector2) constantAnimationInput.RawValue);
|
||||
this.m_remoteObject.SendSetVector2(keyframeIndex, (Vector2)constantAnimationInput.RawValue);
|
||||
return;
|
||||
case AnimationInputType.Vector3:
|
||||
this.m_remoteObject.SendSetVector3(keyframeIndex, (Vector3) constantAnimationInput.RawValue);
|
||||
this.m_remoteObject.SendSetVector3(keyframeIndex, (Vector3)constantAnimationInput.RawValue);
|
||||
return;
|
||||
case AnimationInputType.Vector4:
|
||||
this.m_remoteObject.SendSetVector4(keyframeIndex, (Vector4) constantAnimationInput.RawValue);
|
||||
this.m_remoteObject.SendSetVector4(keyframeIndex, (Vector4)constantAnimationInput.RawValue);
|
||||
return;
|
||||
case AnimationInputType.Quaternion:
|
||||
this.m_remoteObject.SendSetQuaternion(keyframeIndex, (Quaternion) constantAnimationInput.RawValue);
|
||||
this.m_remoteObject.SendSetQuaternion(keyframeIndex, (Quaternion)constantAnimationInput.RawValue);
|
||||
return;
|
||||
default:
|
||||
Debug2.Throw(false, "Unexpected constant input type");
|
||||
@@ -459,16 +459,16 @@ namespace Microsoft.Iris.Render.Animation
|
||||
}
|
||||
case CapturedAnimationInput _:
|
||||
uint propertyInfo1 = this.GeneratePropertyInfo(input.SourceType, input.SourceMask);
|
||||
CapturedAnimationInput capturedAnimationInput = (CapturedAnimationInput) input;
|
||||
CapturedAnimationInput capturedAnimationInput = (CapturedAnimationInput)input;
|
||||
this.m_remoteObject.SendSetCaptured(keyframeIndex, capturedAnimationInput.ObjectId, capturedAnimationInput.PropertyId, propertyInfo1, capturedAnimationInput.RefreshOnRepeat);
|
||||
break;
|
||||
case ContinuousAnimationInput _:
|
||||
uint propertyInfo2 = this.GeneratePropertyInfo(input.SourceType, input.SourceMask);
|
||||
ContinuousAnimationInput continuousAnimationInput = (ContinuousAnimationInput) input;
|
||||
ContinuousAnimationInput continuousAnimationInput = (ContinuousAnimationInput)input;
|
||||
this.m_remoteObject.SendSetContinuous(keyframeIndex, continuousAnimationInput.ObjectId, continuousAnimationInput.PropertyId, propertyInfo2);
|
||||
break;
|
||||
case BinaryOperation _:
|
||||
BinaryOperation binaryOperation = (BinaryOperation) input;
|
||||
BinaryOperation binaryOperation = (BinaryOperation)input;
|
||||
this.SendInputWorker(keyframeIndex, binaryOperation.LeftOperand);
|
||||
this.SendInputWorker(keyframeIndex, binaryOperation.RightOperand);
|
||||
this.m_remoteObject.SendSetBinaryOperation(keyframeIndex, binaryOperation.Operation);
|
||||
@@ -498,7 +498,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
num = interpolation is EaseOutInterpolation ? 1 : 0;
|
||||
break;
|
||||
}
|
||||
System.Type exceptionType = typeof (ArgumentException);
|
||||
System.Type exceptionType = typeof(ArgumentException);
|
||||
Debug2.Validate(num != 0, exceptionType, "Invalid interpolation in keyframe");
|
||||
int idxKeyframe = !this.m_animationSystem.BackCompat ? (keyframeIndex > 0 ? keyframeIndex - 1 : 0) : keyframeIndex;
|
||||
switch (interpolation)
|
||||
@@ -507,15 +507,15 @@ namespace Microsoft.Iris.Render.Animation
|
||||
this.m_remoteObject.SendSetLinear(idxKeyframe, interpolation.UseSphericalCombination);
|
||||
break;
|
||||
case ExponentialInterpolation _:
|
||||
ExponentialInterpolation exponentialInterpolation = (ExponentialInterpolation) interpolation;
|
||||
ExponentialInterpolation exponentialInterpolation = (ExponentialInterpolation)interpolation;
|
||||
this.m_remoteObject.SendSetExponential(idxKeyframe, interpolation.UseSphericalCombination, exponentialInterpolation.Weight);
|
||||
break;
|
||||
case LogarithmicInterpolation _:
|
||||
LogarithmicInterpolation logarithmicInterpolation = (LogarithmicInterpolation) interpolation;
|
||||
LogarithmicInterpolation logarithmicInterpolation = (LogarithmicInterpolation)interpolation;
|
||||
this.m_remoteObject.SendSetLogarithmic(idxKeyframe, interpolation.UseSphericalCombination, logarithmicInterpolation.Weight);
|
||||
break;
|
||||
case SCurveInterpolation _:
|
||||
SCurveInterpolation scurveInterpolation = (SCurveInterpolation) interpolation;
|
||||
SCurveInterpolation scurveInterpolation = (SCurveInterpolation)interpolation;
|
||||
this.m_remoteObject.SendSetSCurve(idxKeyframe, interpolation.UseSphericalCombination, scurveInterpolation.Weight);
|
||||
break;
|
||||
case SineInterpolation _:
|
||||
@@ -525,15 +525,15 @@ namespace Microsoft.Iris.Render.Animation
|
||||
this.m_remoteObject.SendSetCosine(idxKeyframe, interpolation.UseSphericalCombination);
|
||||
break;
|
||||
case BezierInterpolation _:
|
||||
BezierInterpolation bezierInterpolation = (BezierInterpolation) interpolation;
|
||||
BezierInterpolation bezierInterpolation = (BezierInterpolation)interpolation;
|
||||
this.m_remoteObject.SendSetBezier(idxKeyframe, interpolation.UseSphericalCombination, bezierInterpolation.ControlPoint1, bezierInterpolation.ControlPoint2);
|
||||
break;
|
||||
case EaseInInterpolation _:
|
||||
EaseInInterpolation easeInInterpolation = (EaseInInterpolation) interpolation;
|
||||
EaseInInterpolation easeInInterpolation = (EaseInInterpolation)interpolation;
|
||||
this.m_remoteObject.SendSetEaseIn(idxKeyframe, interpolation.UseSphericalCombination, easeInInterpolation.Weight, easeInInterpolation.Handle);
|
||||
break;
|
||||
case EaseOutInterpolation _:
|
||||
EaseOutInterpolation outInterpolation = (EaseOutInterpolation) interpolation;
|
||||
EaseOutInterpolation outInterpolation = (EaseOutInterpolation)interpolation;
|
||||
this.m_remoteObject.SendSetEaseOut(idxKeyframe, interpolation.UseSphericalCombination, outInterpolation.Weight, outInterpolation.Handle);
|
||||
break;
|
||||
default:
|
||||
@@ -542,7 +542,7 @@ namespace Microsoft.Iris.Render.Animation
|
||||
}
|
||||
}
|
||||
|
||||
private uint GeneratePropertyInfo(AnimationInputType sourceType, AnimationTypeMask sourceMask) => (uint) ((int) (sourceType & (AnimationInputType.Vector4 | AnimationInputType.Quaternion)) << 19 | ((int) sourceMask.ChannelCount & 7) << 16 | (int) sourceMask.MaskCode & (int) ushort.MaxValue);
|
||||
private uint GeneratePropertyInfo(AnimationInputType sourceType, AnimationTypeMask sourceMask) => (uint)((int)(sourceType & (AnimationInputType.Vector4 | AnimationInputType.Quaternion)) << 19 | ((int)sourceMask.ChannelCount & 7) << 16 | (int)sourceMask.MaskCode & (int)ushort.MaxValue);
|
||||
|
||||
private enum KeyframeSlots
|
||||
{
|
||||
|
||||
@@ -20,19 +20,19 @@ namespace Microsoft.Iris.Render.Animation
|
||||
string sourcePropertyName,
|
||||
string sourceMaskSpec)
|
||||
{
|
||||
Debug2.Validate(sourceObject is IAnimatableObject, typeof (ArgumentException), nameof (sourceObject));
|
||||
Debug2.Validate(sourcePropertyName != null, typeof (ArgumentException), nameof (sourcePropertyName));
|
||||
Debug2.Validate(sourceObject is IAnimatableObject, typeof(ArgumentException), nameof(sourceObject));
|
||||
Debug2.Validate(sourcePropertyName != null, typeof(ArgumentException), nameof(sourcePropertyName));
|
||||
AnimationTypeMask sourceMask = AnimationTypeMask.FromString(sourceMaskSpec);
|
||||
this.m_object = (IAnimatableObject) sourceObject;
|
||||
this.m_object = (IAnimatableObject)sourceObject;
|
||||
this.m_propertyName = sourcePropertyName;
|
||||
this.CommonCreate(this.m_object.GetPropertyType(this.m_propertyName), sourceMask);
|
||||
}
|
||||
|
||||
protected ObjectAnimationInput(IAnimation sourceAnimation, string sourceMaskSpec)
|
||||
{
|
||||
Debug2.Validate(sourceAnimation is IAnimatableObject, typeof (ArgumentException), nameof (sourceAnimation));
|
||||
Debug2.Validate(sourceAnimation is IAnimatableObject, typeof(ArgumentException), nameof(sourceAnimation));
|
||||
AnimationTypeMask sourceMask = AnimationTypeMask.FromString(sourceMaskSpec);
|
||||
this.m_object = (IAnimatableObject) sourceAnimation;
|
||||
this.m_object = (IAnimatableObject)sourceAnimation;
|
||||
this.m_propertyName = Microsoft.Iris.Render.Animation.Animation.OutputProperty;
|
||||
this.CommonCreate(this.m_object.GetPropertyType(this.m_propertyName), sourceMask);
|
||||
}
|
||||
@@ -43,18 +43,18 @@ namespace Microsoft.Iris.Render.Animation
|
||||
|
||||
internal override void RegisterUsage(object user)
|
||||
{
|
||||
Debug2.Validate(this.m_object != null, typeof (ObjectDisposedException), "Source object doesn't exist anymore");
|
||||
Debug2.Validate(this.m_object != null, typeof(ObjectDisposedException), "Source object doesn't exist anymore");
|
||||
this.m_object.RegisterUsage(user);
|
||||
base.RegisterUsage(user);
|
||||
}
|
||||
|
||||
internal override void UnregisterUsage(object user)
|
||||
{
|
||||
Debug2.Validate(this.m_object != null, typeof (ObjectDisposedException), "Source object doesn't exist anymore");
|
||||
Debug2.Validate(this.m_object != null, typeof(ObjectDisposedException), "Source object doesn't exist anymore");
|
||||
bool flag = this.m_object.UsageCount == 1;
|
||||
this.m_object.UnregisterUsage(user);
|
||||
if (flag)
|
||||
this.m_object = (IAnimatableObject) null;
|
||||
this.m_object = (IAnimatableObject)null;
|
||||
base.UnregisterUsage(user);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,17 +28,17 @@ namespace Microsoft.Iris.Render
|
||||
|
||||
public AnimationEvent(IActivatable eventTarget, string eventMethodName, uint eventMethodArg)
|
||||
{
|
||||
Debug2.Validate(eventTarget != null, typeof (ArgumentNullException), nameof (eventTarget));
|
||||
Debug2.Validate(eventTarget is IActivatableObject, typeof (ArgumentException), nameof (eventTarget));
|
||||
Debug2.Validate(eventMethodName != null, typeof (ArgumentNullException), nameof (eventMethodName));
|
||||
Debug2.Validate(eventTarget != null, typeof(ArgumentNullException), nameof(eventTarget));
|
||||
Debug2.Validate(eventTarget is IActivatableObject, typeof(ArgumentException), nameof(eventTarget));
|
||||
Debug2.Validate(eventMethodName != null, typeof(ArgumentNullException), nameof(eventMethodName));
|
||||
this.m_eventId = AnimationEvent.AllocateEventId();
|
||||
this.m_eventTarget = (IActivatableObject) eventTarget;
|
||||
this.m_eventTarget = (IActivatableObject)eventTarget;
|
||||
this.m_eventMethodName = eventMethodName;
|
||||
this.m_eventMethodArg = eventMethodArg;
|
||||
this.m_allowRepeat = false;
|
||||
}
|
||||
|
||||
~AnimationEvent() => this.m_eventTarget = (IActivatableObject) null;
|
||||
~AnimationEvent() => this.m_eventTarget = (IActivatableObject)null;
|
||||
|
||||
internal uint EventId => this.m_eventId;
|
||||
|
||||
@@ -60,6 +60,6 @@ namespace Microsoft.Iris.Render
|
||||
set => this.m_initialActivation = value;
|
||||
}
|
||||
|
||||
private static uint AllocateEventId() => (uint) AnimationEvent.s_eventIdSeed++;
|
||||
private static uint AllocateEventId() => (uint)AnimationEvent.s_eventIdSeed++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Microsoft.Iris.Render
|
||||
|
||||
protected void CommonCreate(AnimationInputType sourceType, AnimationTypeMask sourceMask)
|
||||
{
|
||||
Debug2.Validate(sourceMask.CanMapFromType(sourceType), typeof (ArgumentException), nameof (sourceMask));
|
||||
Debug2.Validate(sourceMask.CanMapFromType(sourceType), typeof(ArgumentException), nameof(sourceMask));
|
||||
AnimationInputType animationInputType;
|
||||
switch (sourceMask.ChannelCount)
|
||||
{
|
||||
@@ -62,16 +62,16 @@ namespace Microsoft.Iris.Render
|
||||
|
||||
public static AnimationInput operator +(AnimationInput left, AnimationInput right)
|
||||
{
|
||||
Debug2.Validate(left != null, typeof (ArgumentNullException), nameof (left));
|
||||
Debug2.Validate(right != null, typeof (ArgumentNullException), nameof (right));
|
||||
return (AnimationInput) new BinaryOperation(BinaryOpCode.Add, left, right);
|
||||
Debug2.Validate(left != null, typeof(ArgumentNullException), nameof(left));
|
||||
Debug2.Validate(right != null, typeof(ArgumentNullException), nameof(right));
|
||||
return (AnimationInput)new BinaryOperation(BinaryOpCode.Add, left, right);
|
||||
}
|
||||
|
||||
public static AnimationInput operator *(AnimationInput left, AnimationInput right)
|
||||
{
|
||||
Debug2.Validate(left != null, typeof (ArgumentNullException), nameof (left));
|
||||
Debug2.Validate(right != null, typeof (ArgumentNullException), nameof (right));
|
||||
return (AnimationInput) new BinaryOperation(BinaryOpCode.Multiply, left, right);
|
||||
Debug2.Validate(left != null, typeof(ArgumentNullException), nameof(left));
|
||||
Debug2.Validate(right != null, typeof(ArgumentNullException), nameof(right));
|
||||
return (AnimationInput)new BinaryOperation(BinaryOpCode.Multiply, left, right);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ namespace Microsoft.Iris.Render
|
||||
AnimationInput value,
|
||||
AnimationInterpolation interpolation)
|
||||
{
|
||||
Debug2.Validate((double) time >= 0.0, typeof (ArgumentException), "'time' must not be negative");
|
||||
Debug2.Validate(value != null, typeof (ArgumentNullException), nameof (value));
|
||||
Debug2.Validate(interpolation != null, typeof (ArgumentNullException), nameof (interpolation));
|
||||
Debug2.Validate((double)time >= 0.0, typeof(ArgumentException), "'time' must not be negative");
|
||||
Debug2.Validate(value != null, typeof(ArgumentNullException), nameof(value));
|
||||
Debug2.Validate(interpolation != null, typeof(ArgumentNullException), nameof(interpolation));
|
||||
this.m_time = time;
|
||||
this.m_value = value;
|
||||
this.m_interpolation = interpolation;
|
||||
|
||||
@@ -26,15 +26,15 @@ namespace Microsoft.Iris.Render
|
||||
|
||||
public AnimationTypeMask(AnimationTypeChannel channel0)
|
||||
{
|
||||
this.m_maskCode = (ushort) 0;
|
||||
this.m_channelCount = (byte) 1;
|
||||
this.m_maskCode = (ushort)0;
|
||||
this.m_channelCount = (byte)1;
|
||||
this[0] = channel0;
|
||||
}
|
||||
|
||||
public AnimationTypeMask(AnimationTypeChannel channel0, AnimationTypeChannel channel1)
|
||||
{
|
||||
this.m_maskCode = (ushort) 0;
|
||||
this.m_channelCount = (byte) 2;
|
||||
this.m_maskCode = (ushort)0;
|
||||
this.m_channelCount = (byte)2;
|
||||
this[0] = channel0;
|
||||
this[1] = channel1;
|
||||
}
|
||||
@@ -44,8 +44,8 @@ namespace Microsoft.Iris.Render
|
||||
AnimationTypeChannel channel1,
|
||||
AnimationTypeChannel channel2)
|
||||
{
|
||||
this.m_maskCode = (ushort) 0;
|
||||
this.m_channelCount = (byte) 3;
|
||||
this.m_maskCode = (ushort)0;
|
||||
this.m_channelCount = (byte)3;
|
||||
this[0] = channel0;
|
||||
this[1] = channel1;
|
||||
this[2] = channel2;
|
||||
@@ -57,8 +57,8 @@ namespace Microsoft.Iris.Render
|
||||
AnimationTypeChannel channel2,
|
||||
AnimationTypeChannel channel3)
|
||||
{
|
||||
this.m_maskCode = (ushort) 0;
|
||||
this.m_channelCount = (byte) 4;
|
||||
this.m_maskCode = (ushort)0;
|
||||
this.m_channelCount = (byte)4;
|
||||
this[0] = channel0;
|
||||
this[1] = channel1;
|
||||
this[2] = channel2;
|
||||
@@ -73,7 +73,7 @@ namespace Microsoft.Iris.Render
|
||||
|
||||
internal ushort MaskCode => this.m_maskCode;
|
||||
|
||||
public uint ChannelCount => (uint) this.m_channelCount & 7U;
|
||||
public uint ChannelCount => (uint)this.m_channelCount & 7U;
|
||||
|
||||
public static AnimationTypeMask FromString(string maskSpec)
|
||||
{
|
||||
@@ -84,65 +84,65 @@ namespace Microsoft.Iris.Render
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug2.Validate(maskSpec.Length > 0 && maskSpec.Length <= 4, typeof (ArgumentException), "Invalid mask spec");
|
||||
Debug2.Validate(maskSpec.Length > 0 && maskSpec.Length <= 4, typeof(ArgumentException), "Invalid mask spec");
|
||||
ArrayList arrayList = new ArrayList();
|
||||
for (int index = 0; index < maskSpec.Length; ++index)
|
||||
{
|
||||
switch (maskSpec[index])
|
||||
{
|
||||
case '0':
|
||||
arrayList.Add((object) AnimationTypeChannel.O);
|
||||
arrayList.Add((object)AnimationTypeChannel.O);
|
||||
break;
|
||||
case 'A':
|
||||
case 'a':
|
||||
arrayList.Add((object) AnimationTypeChannel.W);
|
||||
arrayList.Add((object)AnimationTypeChannel.W);
|
||||
break;
|
||||
case 'B':
|
||||
case 'b':
|
||||
arrayList.Add((object) AnimationTypeChannel.Z);
|
||||
arrayList.Add((object)AnimationTypeChannel.Z);
|
||||
break;
|
||||
case 'G':
|
||||
case 'g':
|
||||
arrayList.Add((object) AnimationTypeChannel.Y);
|
||||
arrayList.Add((object)AnimationTypeChannel.Y);
|
||||
break;
|
||||
case 'R':
|
||||
case 'r':
|
||||
arrayList.Add((object) AnimationTypeChannel.X);
|
||||
arrayList.Add((object)AnimationTypeChannel.X);
|
||||
break;
|
||||
case 'W':
|
||||
case 'w':
|
||||
arrayList.Add((object) AnimationTypeChannel.W);
|
||||
arrayList.Add((object)AnimationTypeChannel.W);
|
||||
break;
|
||||
case 'X':
|
||||
case 'x':
|
||||
arrayList.Add((object) AnimationTypeChannel.X);
|
||||
arrayList.Add((object)AnimationTypeChannel.X);
|
||||
break;
|
||||
case 'Y':
|
||||
case 'y':
|
||||
arrayList.Add((object) AnimationTypeChannel.Y);
|
||||
arrayList.Add((object)AnimationTypeChannel.Y);
|
||||
break;
|
||||
case 'Z':
|
||||
case 'z':
|
||||
arrayList.Add((object) AnimationTypeChannel.Z);
|
||||
arrayList.Add((object)AnimationTypeChannel.Z);
|
||||
break;
|
||||
default:
|
||||
Debug2.Validate(false, typeof (ArgumentException), (object) "Invalid mask spec: {0}", (object) maskSpec[index]);
|
||||
Debug2.Validate(false, typeof(ArgumentException), (object)"Invalid mask spec: {0}", (object)maskSpec[index]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (arrayList.Count)
|
||||
{
|
||||
case 1:
|
||||
animationTypeMask = new AnimationTypeMask((AnimationTypeChannel) arrayList[0]);
|
||||
animationTypeMask = new AnimationTypeMask((AnimationTypeChannel)arrayList[0]);
|
||||
break;
|
||||
case 2:
|
||||
animationTypeMask = new AnimationTypeMask((AnimationTypeChannel) arrayList[0], (AnimationTypeChannel) arrayList[1]);
|
||||
animationTypeMask = new AnimationTypeMask((AnimationTypeChannel)arrayList[0], (AnimationTypeChannel)arrayList[1]);
|
||||
break;
|
||||
case 3:
|
||||
animationTypeMask = new AnimationTypeMask((AnimationTypeChannel) arrayList[0], (AnimationTypeChannel) arrayList[1], (AnimationTypeChannel) arrayList[2]);
|
||||
animationTypeMask = new AnimationTypeMask((AnimationTypeChannel)arrayList[0], (AnimationTypeChannel)arrayList[1], (AnimationTypeChannel)arrayList[2]);
|
||||
break;
|
||||
case 4:
|
||||
animationTypeMask = new AnimationTypeMask((AnimationTypeChannel) arrayList[0], (AnimationTypeChannel) arrayList[1], (AnimationTypeChannel) arrayList[2], (AnimationTypeChannel) arrayList[3]);
|
||||
animationTypeMask = new AnimationTypeMask((AnimationTypeChannel)arrayList[0], (AnimationTypeChannel)arrayList[1], (AnimationTypeChannel)arrayList[2], (AnimationTypeChannel)arrayList[3]);
|
||||
break;
|
||||
default:
|
||||
Debug2.Throw(false, "Too many channels in mask spec!");
|
||||
@@ -153,7 +153,7 @@ namespace Microsoft.Iris.Render
|
||||
return animationTypeMask;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj) => obj is AnimationTypeMask animationTypeMask && (int) animationTypeMask.m_channelCount == (int) this.m_channelCount && (int) animationTypeMask.m_maskCode == (int) this.m_maskCode;
|
||||
public override bool Equals(object obj) => obj is AnimationTypeMask animationTypeMask && (int)animationTypeMask.m_channelCount == (int)this.m_channelCount && (int)animationTypeMask.m_maskCode == (int)this.m_maskCode;
|
||||
|
||||
public override int GetHashCode() => this.m_channelCount.GetHashCode() ^ this.m_maskCode.GetHashCode();
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace Microsoft.Iris.Render
|
||||
}
|
||||
if (this.ChannelCount != 0U)
|
||||
{
|
||||
for (int channelIndex = 0; (long) channelIndex < (long) this.ChannelCount; ++channelIndex)
|
||||
for (int channelIndex = 0; (long)channelIndex < (long)this.ChannelCount; ++channelIndex)
|
||||
{
|
||||
if (this[channelIndex] > animationTypeChannel)
|
||||
flag = false;
|
||||
@@ -221,17 +221,17 @@ namespace Microsoft.Iris.Render
|
||||
|
||||
private AnimationTypeChannel GetChannel(int channelIndex)
|
||||
{
|
||||
Debug2.Validate(channelIndex >= 0 && channelIndex <= 3, typeof (ArgumentOutOfRangeException), "Channel index must be between 0 and 3");
|
||||
return (AnimationTypeChannel) ((int) this.m_maskCode >> channelIndex * 4 & 15);
|
||||
Debug2.Validate(channelIndex >= 0 && channelIndex <= 3, typeof(ArgumentOutOfRangeException), "Channel index must be between 0 and 3");
|
||||
return (AnimationTypeChannel)((int)this.m_maskCode >> channelIndex * 4 & 15);
|
||||
}
|
||||
|
||||
private void SetChannel(int channelIndex, AnimationTypeChannel channel)
|
||||
{
|
||||
Debug2.Validate(channelIndex >= 0 && channelIndex <= 3, typeof (ArgumentOutOfRangeException), "Channel index must be between 0 and 3");
|
||||
Debug2.Validate(channel >= AnimationTypeChannel.O && channel <= AnimationTypeChannel.W, typeof (ArgumentOutOfRangeException), nameof (channel));
|
||||
int num1 = (int) channel << channelIndex * 4;
|
||||
Debug2.Validate(channelIndex >= 0 && channelIndex <= 3, typeof(ArgumentOutOfRangeException), "Channel index must be between 0 and 3");
|
||||
Debug2.Validate(channel >= AnimationTypeChannel.O && channel <= AnimationTypeChannel.W, typeof(ArgumentOutOfRangeException), nameof(channel));
|
||||
int num1 = (int)channel << channelIndex * 4;
|
||||
int num2 = 15 << channelIndex * 4;
|
||||
this.m_maskCode = (ushort) (((int) this.m_maskCode & ~num2 | num1 & num2) & (int) ushort.MaxValue);
|
||||
this.m_maskCode = (ushort)(((int)this.m_maskCode & ~num2 | num1 & num2) & (int)ushort.MaxValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Microsoft.Iris.Render
|
||||
|
||||
public override bool Equals(object obj) => obj is AxisAngle axisAngle && this == axisAngle;
|
||||
|
||||
public static bool operator ==(AxisAngle left, AxisAngle right) => left.Axis == right.Axis && (double) left.Angle == (double) right.Angle;
|
||||
public static bool operator ==(AxisAngle left, AxisAngle right) => left.Axis == right.Axis && (double)left.Angle == (double)right.Angle;
|
||||
|
||||
public static bool operator !=(AxisAngle left, AxisAngle right) => !(left == right);
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace Microsoft.Iris.Render
|
||||
AnimationInput leftInput,
|
||||
AnimationInput rightInput)
|
||||
{
|
||||
Debug2.Validate(leftInput != null, typeof (ArgumentNullException), nameof (leftInput));
|
||||
Debug2.Validate(rightInput != null, typeof (ArgumentNullException), nameof (rightInput));
|
||||
Debug2.Validate(leftInput != null, typeof(ArgumentNullException), nameof(leftInput));
|
||||
Debug2.Validate(rightInput != null, typeof(ArgumentNullException), nameof(rightInput));
|
||||
this.m_leftInput = leftInput;
|
||||
this.m_rightInput = rightInput;
|
||||
this.m_opCode = opCode;
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace Microsoft.Iris.Render
|
||||
AlphaOperation alphaOperation)
|
||||
: this()
|
||||
{
|
||||
Debug2.Validate(effectInput1 != null, typeof (ArgumentNullException), nameof (effectInput1));
|
||||
Debug2.Validate(effectInput2 != null, typeof (ArgumentNullException), nameof (effectInput2));
|
||||
Debug2.Validate(effectInput1 != null, typeof(ArgumentNullException), nameof(effectInput1));
|
||||
Debug2.Validate(effectInput2 != null, typeof(ArgumentNullException), nameof(effectInput2));
|
||||
this.m_effectInput1 = effectInput1;
|
||||
this.m_effectInput2 = effectInput2;
|
||||
this.m_colorOperation = colorOperation;
|
||||
@@ -38,8 +38,8 @@ namespace Microsoft.Iris.Render
|
||||
ColorOperation colorOperation)
|
||||
: this()
|
||||
{
|
||||
Debug2.Validate(effectInput1 != null, typeof (ArgumentNullException), nameof (effectInput1));
|
||||
Debug2.Validate(effectInput2 != null, typeof (ArgumentNullException), nameof (effectInput2));
|
||||
Debug2.Validate(effectInput1 != null, typeof(ArgumentNullException), nameof(effectInput1));
|
||||
Debug2.Validate(effectInput2 != null, typeof(ArgumentNullException), nameof(effectInput2));
|
||||
this.m_effectInput1 = effectInput1;
|
||||
this.m_effectInput2 = effectInput2;
|
||||
this.m_colorOperation = colorOperation;
|
||||
@@ -79,8 +79,8 @@ namespace Microsoft.Iris.Render
|
||||
internal override void AddCacheKey(ByteBuilder cacheKey)
|
||||
{
|
||||
base.AddCacheKey(cacheKey);
|
||||
this.GenerateClassCacheKey((byte) 2, (byte) this.m_colorOperation, cacheKey);
|
||||
this.GenerateClassCacheKey((byte) 2, (byte) this.m_alphaOperation, cacheKey);
|
||||
this.GenerateClassCacheKey((byte)2, (byte)this.m_colorOperation, cacheKey);
|
||||
this.GenerateClassCacheKey((byte)2, (byte)this.m_alphaOperation, cacheKey);
|
||||
this.m_effectInput1.AddCacheKey(cacheKey);
|
||||
this.m_effectInput2.AddCacheKey(cacheKey);
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace Microsoft.Iris.Render
|
||||
public BrightnessElement(string stName, float flBrightness)
|
||||
: this()
|
||||
{
|
||||
Debug2.Validate(!string.IsNullOrEmpty(stName), typeof (ArgumentException), nameof (stName));
|
||||
Debug2.Validate((double) flBrightness >= -1.0 && (double) flBrightness <= 1.0, typeof (ArgumentOutOfRangeException), "Valid range for Brightness is [-1..1]");
|
||||
Debug2.Validate(!string.IsNullOrEmpty(stName), typeof(ArgumentException), nameof(stName));
|
||||
Debug2.Validate((double)flBrightness >= -1.0 && (double)flBrightness <= 1.0, typeof(ArgumentOutOfRangeException), "Valid range for Brightness is [-1..1]");
|
||||
this.m_flBrightness = flBrightness;
|
||||
this.m_stName = stName;
|
||||
}
|
||||
@@ -39,10 +39,10 @@ namespace Microsoft.Iris.Render
|
||||
Map<string, EffectProperty> dictionary,
|
||||
ref byte nNextUniqueID)
|
||||
{
|
||||
return base.PreProcessProperties(dictionary, ref nNextUniqueID) + this.PreProcessProperty(dictionary, "Brightness", (byte) 8, ref this.m_nBrightnessID, ref nNextUniqueID);
|
||||
return base.PreProcessProperties(dictionary, ref nNextUniqueID) + this.PreProcessProperty(dictionary, "Brightness", (byte)8, ref this.m_nBrightnessID, ref nNextUniqueID);
|
||||
}
|
||||
|
||||
internal override bool Process(Map<string, EffectProperty> dictProperties) => this.GenerateProperty("Brightness", EffectPropertyType.Float, (object) this.m_flBrightness, this.m_nBrightnessID, dictProperties);
|
||||
internal override bool Process(Map<string, EffectProperty> dictProperties) => this.GenerateProperty("Brightness", EffectPropertyType.Float, (object)this.m_flBrightness, this.m_nBrightnessID, dictProperties);
|
||||
|
||||
internal override void AddCacheKey(ByteBuilder cacheKey)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Microsoft.Iris.Render
|
||||
private bool m_refreshOnRepeat;
|
||||
|
||||
public CapturedAnimationInput(IAnimatable sourceObject, string sourcePropertyName)
|
||||
: this(sourceObject, sourcePropertyName, (string) null)
|
||||
: this(sourceObject, sourcePropertyName, (string)null)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Microsoft.Iris.Render
|
||||
}
|
||||
|
||||
public CapturedAnimationInput(IAnimation sourceAnimation)
|
||||
: this(sourceAnimation, (string) null)
|
||||
: this(sourceAnimation, (string)null)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user