本文整理汇总了C#中AssetList.GetEnumerator方法的典型用法代码示例。如果您正苦于以下问题:C# AssetList.GetEnumerator方法的具体用法?C# AssetList.GetEnumerator怎么用?C# AssetList.GetEnumerator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AssetList
的用法示例。
在下文中一共展示了AssetList.GetEnumerator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoOpen
private void DoOpen(AssetList assets, bool alreadyOpen)
{
if (alreadyOpen)
{
using (List<Asset>.Enumerator enumerator = assets.GetEnumerator())
{
while (enumerator.MoveNext())
{
Asset current = enumerator.Current;
bool flag = false;
int count = this.assetList.Count;
for (int index = 0; index < count; ++index)
{
if (this.assetList[index].path == current.path)
{
flag = true;
this.assetList[index] = current;
break;
}
}
if (!flag)
this.assetList.Add(current);
}
}
}
else
this.assetList.AddRange((IEnumerable<Asset>) assets);
this.RefreshList();
}
示例2: OpenIfCheckoutFailed
public static void OpenIfCheckoutFailed(AssetList assets)
{
Object[] objectsOfTypeAll = Resources.FindObjectsOfTypeAll(typeof (WindowCheckoutFailure));
bool alreadyOpen = (objectsOfTypeAll.Length <= 0 ? (Object) null : (Object) (objectsOfTypeAll[0] as WindowCheckoutFailure)) != (Object) null;
bool flag = alreadyOpen;
if (!flag)
{
using (List<Asset>.Enumerator enumerator = assets.GetEnumerator())
{
while (enumerator.MoveNext())
{
if (!enumerator.Current.IsState(Asset.States.CheckedOutLocal))
{
flag = true;
break;
}
}
}
}
if (!flag)
return;
WindowCheckoutFailure.GetWindow().DoOpen(assets, alreadyOpen);
}