本文整理汇总了C#中IAlbum.Inflate方法的典型用法代码示例。如果您正苦于以下问题:C# IAlbum.Inflate方法的具体用法?C# IAlbum.Inflate怎么用?C# IAlbum.Inflate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAlbum
的用法示例。
在下文中一共展示了IAlbum.Inflate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SynchIsPrivatePropertyOnChildGalleryObjectsRecursive
/// <summary>
/// Set the IsPrivate property of all child albums and media objects of the specified album to have the same value
/// as the specified album.
/// </summary>
/// <param name="album">The album whose child objects are to be updated to have the same IsPrivate value.</param>
/// <param name="userName">Name of the current user.</param>
private static void SynchIsPrivatePropertyOnChildGalleryObjectsRecursive(IAlbum album, string userName)
{
album.Inflate(true);
foreach (IAlbum childAlbum in album.GetChildGalleryObjects(GalleryObjectType.Album))
{
childAlbum.Inflate(true); // The above Inflate() does not inflate child albums, so we need to explicitly inflate it.
childAlbum.IsPrivate = album.IsPrivate;
GalleryObjectController.SaveGalleryObject(childAlbum, userName);
SynchIsPrivatePropertyOnChildGalleryObjectsRecursive(childAlbum, userName);
}
foreach (IGalleryObject childGalleryObject in album.GetChildGalleryObjects(GalleryObjectType.MediaObject))
{
childGalleryObject.IsPrivate = album.IsPrivate;
GalleryObjectController.SaveGalleryObject(childGalleryObject, userName);
}
}