@@ -18,6 +18,21 @@ namespace Parse {
1818 /// configuration for the Parse library.
1919 /// </summary>
2020 public static partial class ParseClient {
21+ /// <summary>
22+ /// Represents the configuration of the Parse SDK.
23+ /// </summary>
24+ public struct Configuration {
25+ /// <summary>
26+ /// The Parse.com application ID of your app.
27+ /// </summary>
28+ public String ApplicationId { get ; set ; }
29+
30+ /// <summary>
31+ /// The Parse.com .NET key for your app.
32+ /// </summary>
33+ public String WindowsKey { get ; set ; }
34+ }
35+
2136 internal const string DateFormatString = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fff'Z'" ;
2237
2338 private static readonly object mutex = new object ( ) ;
@@ -49,12 +64,13 @@ private static Type GetParseType(string name) {
4964 internal static IPlatformHooks PlatformHooks { get { return platformHooks ; } }
5065
5166 private static readonly IParseCommandRunner commandRunner ;
52- internal static IParseCommandRunner ParseCommandRunner { get { return commandRunner ; } }
53-
67+ internal static IParseCommandRunner ParseCommandRunner { get { return commandRunner ; } }
68+
69+ /// <summary>
70+ /// The current configuration that parse has been initialized with.
71+ /// </summary>
72+ public static Configuration CurrentConfiguration { get ; internal set ; }
5473 internal static Uri HostName { get ; set ; }
55- internal static string MasterKey { get ; set ; }
56- internal static string ApplicationId { get ; set ; }
57- internal static string WindowsKey { get ; set ; }
5874
5975 internal static Version Version {
6076 get {
@@ -81,10 +97,24 @@ internal static string VersionString {
8197 /// <param name="dotnetKey">The .NET API Key provided in the Parse dashboard.
8298 /// </param>
8399 public static void Initialize ( string applicationId , string dotnetKey ) {
100+ Initialize ( new Configuration {
101+ ApplicationId = applicationId ,
102+ WindowsKey = dotnetKey
103+ } ) ;
104+ }
105+
106+ /// <summary>
107+ /// Authenticates this client as belonging to your application. This must be
108+ /// called before your application can use the Parse library. The recommended
109+ /// way is to put a call to <c>ParseFramework.Initialize</c> in your
110+ /// Application startup.
111+ /// </summary>
112+ /// <param name="configuration">The configuration to initialze Parse with.
113+ /// </param>
114+ public static void Initialize ( Configuration configuration ) {
84115 lock ( mutex ) {
85116 HostName = HostName ?? new Uri ( "https://api.parse.com/1/" ) ;
86- ApplicationId = applicationId ;
87- WindowsKey = dotnetKey ;
117+ CurrentConfiguration = configuration ;
88118
89119 ParseObject . RegisterSubclass < ParseUser > ( ) ;
90120 ParseObject . RegisterSubclass < ParseInstallation > ( ) ;
0 commit comments