2021-11-11 11:18:46 -06:00
|
|
|
using System;
|
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
using Microsoft.Iris;
|
|
|
|
|
|
|
|
|
|
namespace MicrosoftZuneLibrary
|
|
|
|
|
{
|
|
|
|
|
internal class LibraryDataProviderQueryResult : DataProviderObject
|
|
|
|
|
{
|
|
|
|
|
protected LibraryVirtualList m_virtualListResultSet;
|
|
|
|
|
|
|
|
|
|
protected bool m_isEmpty;
|
|
|
|
|
|
|
|
|
|
public LibraryDataProviderQueryResult(LibraryDataProviderQuery owner, LibraryVirtualList virtualListResultSet, object resultTypeCookie)
|
|
|
|
|
: base(owner, resultTypeCookie)
|
|
|
|
|
{
|
|
|
|
|
m_virtualListResultSet = virtualListResultSet;
|
|
|
|
|
if (virtualListResultSet == null)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
2021-11-18 12:01:22 -06:00
|
|
|
foreach (DataProviderMapping value in Mappings.Values)
|
2021-11-11 11:18:46 -06:00
|
|
|
{
|
|
|
|
|
if (value.UnderlyingCollectionTypeCookie != null)
|
|
|
|
|
{
|
|
|
|
|
m_virtualListResultSet.SetItemTypeCookie(value.UnderlyingCollectionTypeName, value.UnderlyingCollectionTypeCookie);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override object GetProperty(string propertyName)
|
|
|
|
|
{
|
|
|
|
|
DataProviderMapping value = null;
|
|
|
|
|
if (propertyName == "IsEmpty")
|
|
|
|
|
{
|
|
|
|
|
return m_isEmpty;
|
|
|
|
|
}
|
2021-11-18 12:01:22 -06:00
|
|
|
if (Mappings.TryGetValue(propertyName, out value))
|
2021-11-11 11:18:46 -06:00
|
|
|
{
|
|
|
|
|
return m_virtualListResultSet;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void SetProperty(string propertyName, object value)
|
|
|
|
|
{
|
|
|
|
|
//Discarded unreachable code: IL_0006
|
|
|
|
|
throw new NotSupportedException();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SetIsEmpty([MarshalAs(UnmanagedType.U1)] bool isEmpty)
|
|
|
|
|
{
|
|
|
|
|
if (m_isEmpty != isEmpty)
|
|
|
|
|
{
|
|
|
|
|
m_isEmpty = isEmpty;
|
|
|
|
|
FirePropertyChanged("IsEmpty");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|