@@ -28,6 +28,20 @@ public static partial class ParseClient {
2828 "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'f'Z'" ,
2929 } ;
3030
31+ /// <summary>
32+ /// Represents the configuration of the Parse SDK.
33+ /// </summary>
34+ public struct Configuration {
35+ /// <summary>
36+ /// The Parse.com application ID of your app.
37+ /// </summary>
38+ public String ApplicationId { get ; set ; }
39+
40+ /// <summary>
41+ /// The Parse.com .NET key for your app.
42+ /// </summary>
43+ public String WindowsKey { get ; set ; }
44+ }
3145
3246 private static readonly object mutex = new object ( ) ;
3347 private static readonly string [ ] assemblyNames = {
@@ -60,10 +74,12 @@ private static Type GetParseType(string name) {
6074 private static readonly IParseCommandRunner commandRunner ;
6175 internal static IParseCommandRunner ParseCommandRunner { get { return commandRunner ; } }
6276
77+ /// <summary>
78+ /// The current configuration that parse has been initialized with.
79+ /// </summary>
80+ public static Configuration CurrentConfiguration { get ; internal set ; }
6381 internal static Uri HostName { get ; set ; }
6482 internal static string MasterKey { get ; set ; }
65- internal static string ApplicationId { get ; set ; }
66- internal static string WindowsKey { get ; set ; }
6783
6884 internal static Version Version {
6985 get {
@@ -90,10 +106,24 @@ internal static string VersionString {
90106 /// <param name="dotnetKey">The .NET API Key provided in the Parse dashboard.
91107 /// </param>
92108 public static void Initialize ( string applicationId , string dotnetKey ) {
109+ Initialize ( new Configuration {
110+ ApplicationId = applicationId ,
111+ WindowsKey = dotnetKey
112+ } ) ;
113+ }
114+
115+ /// <summary>
116+ /// Authenticates this client as belonging to your application. This must be
117+ /// called before your application can use the Parse library. The recommended
118+ /// way is to put a call to <c>ParseFramework.Initialize</c> in your
119+ /// Application startup.
120+ /// </summary>
121+ /// <param name="configuration">The configuration to initialze Parse with.
122+ /// </param>
123+ public static void Initialize ( Configuration configuration ) {
93124 lock ( mutex ) {
94125 HostName = HostName ?? new Uri ( "https://api.parse.com/1/" ) ;
95- ApplicationId = applicationId ;
96- WindowsKey = dotnetKey ;
126+ CurrentConfiguration = configuration ;
97127
98128 ParseObject . RegisterSubclass < ParseUser > ( ) ;
99129 ParseObject . RegisterSubclass < ParseInstallation > ( ) ;
0 commit comments