-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrapped the remaining NSMutableArray properties
- Loading branch information
1 parent
04e5d11
commit 78b7847
Showing
4 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System.Collections.Generic; | ||
|
||
using Microsoft.Band.Pages; | ||
|
||
namespace Microsoft.Band.Tiles | ||
{ | ||
public partial class BandTile | ||
{ | ||
private object pageIconsLock = new object(); | ||
private BandCollection<BandIcon> pageIcons; | ||
|
||
public IList<BandIcon> PageIcons { | ||
get { | ||
// check outside to avoid unnecessary locking | ||
if (pageIcons == null) { | ||
// we lock for thread safety | ||
lock (pageIconsLock) { | ||
// do a check before init | ||
if (pageIcons == null) { | ||
pageIcons = new BandCollection<BandIcon> (PageIconsInternal); | ||
} | ||
} | ||
} | ||
|
||
return pageIcons; | ||
} | ||
} | ||
|
||
private object pageLayoutsLock = new object(); | ||
private BandCollection<BandPageLayout> pageLayouts; | ||
|
||
public IList<BandPageLayout> PageLayouts { | ||
get { | ||
// check outside to avoid unnecessary locking | ||
if (pageLayouts == null) { | ||
// we lock for thread safety | ||
lock (pageLayoutsLock) { | ||
// do a check before init | ||
if (pageLayouts == null) { | ||
pageLayouts = new BandCollection<BandPageLayout> (PageLayoutsInternal); | ||
} | ||
} | ||
} | ||
|
||
return pageLayouts; | ||
} | ||
} | ||
} | ||
} |