diff --git a/Assets/Editor/Build.cs b/Assets/Editor/Build.cs new file mode 100644 index 000000000..2e3a7230d --- /dev/null +++ b/Assets/Editor/Build.cs @@ -0,0 +1,26 @@ +using UnityEngine; +using System.Collections; +using System.IO; +using UnityEditor; + +namespace Appboy.Editor { + public static class Build { + private static string[] AssetPathNames = { + "Assets/Plugins/Android", + "Assets/Plugins/Appboy", + "Assets/Plugins/iOS" + }; + + public static void ExportPackage() { + Debug.Log("Exporting Appboy Unity Package..."); + System.IO.Directory.CreateDirectory("unity-package"); + AssetDatabase.ExportPackage(AssetPathNames, "unity-package/Appboy.unitypackage", ExportPackageOptions.Recurse); + } + + public static void ExportPackageWithoutDependencies() { + Debug.Log("Exporting Appboy Unity Package without dependencies..."); + System.IO.Directory.CreateDirectory("unity-package"); + AssetDatabase.ExportPackage(AssetPathNames, "unity-package/Appboy-nodeps.unitypackage", ExportPackageOptions.Recurse); + } + } +} \ No newline at end of file diff --git a/Plugins/Android/AndroidManifest.xml b/Assets/Plugins/Android/AndroidManifest.xml similarity index 100% rename from Plugins/Android/AndroidManifest.xml rename to Assets/Plugins/Android/AndroidManifest.xml diff --git a/Plugins/Android/libs/android-support-v4.aar b/Assets/Plugins/Android/libs/android-support-v4.aar similarity index 100% rename from Plugins/Android/libs/android-support-v4.aar rename to Assets/Plugins/Android/libs/android-support-v4.aar diff --git a/Assets/Plugins/Android/libs/appboy-ui.aar b/Assets/Plugins/Android/libs/appboy-ui.aar new file mode 100644 index 000000000..8747d918a Binary files /dev/null and b/Assets/Plugins/Android/libs/appboy-ui.aar differ diff --git a/Assets/Plugins/Android/libs/appboy-unity.aar b/Assets/Plugins/Android/libs/appboy-unity.aar new file mode 100644 index 000000000..1a7519062 Binary files /dev/null and b/Assets/Plugins/Android/libs/appboy-unity.aar differ diff --git a/Assets/Plugins/Android/libs/appboy.jar b/Assets/Plugins/Android/libs/appboy.jar new file mode 100644 index 000000000..be1daf66e Binary files /dev/null and b/Assets/Plugins/Android/libs/appboy.jar differ diff --git a/Plugins/Android/res/values/appboy.xml b/Assets/Plugins/Android/res/values/appboy.xml similarity index 100% rename from Plugins/Android/res/values/appboy.xml rename to Assets/Plugins/Android/res/values/appboy.xml diff --git a/Plugins/Appboy/AppboyBinding.cs b/Assets/Plugins/Appboy/AppboyBinding.cs similarity index 84% rename from Plugins/Appboy/AppboyBinding.cs rename to Assets/Plugins/Appboy/AppboyBinding.cs index a418ad626..00a745a7c 100755 --- a/Plugins/Appboy/AppboyBinding.cs +++ b/Assets/Plugins/Appboy/AppboyBinding.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Runtime.InteropServices; using Appboy.Utilities; +using System; /// /// These methods can be called by Unity applications using iOS or Android in order to report @@ -19,6 +20,8 @@ namespace Appboy { public class AppboyBinding : MonoBehaviour { public const string Version = "1.2.1"; + // Overloads + // These will call the associated binding method for the current live platform public static void LogPurchase(string productId, string currencyCode, decimal price) { LogPurchase(productId, currencyCode, price, 1); } @@ -26,6 +29,7 @@ public static void LogPurchase(string productId, string currencyCode, decimal pr public static void IncrementCustomUserAttribute(string key) { IncrementCustomUserAttribute(key, 1); } + // End Overloads #if UNITY_IOS void Start() { @@ -156,7 +160,7 @@ public static void LogCustomEvent(string eventName) { _logCustomEvent(eventName, null); } - public static void LogCustomEvent(string eventName, Dictionary properties) { + public static void LogCustomEvent(string eventName, Dictionary properties) { var propertiesString = Json.Serialize(properties); _logCustomEvent(eventName, propertiesString); } @@ -165,7 +169,7 @@ public static void LogPurchase(string productId, string currencyCode, decimal pr _logPurchase(productId, currencyCode, price.ToString(), quantity, null); } - public static void LogPurchase(string productId, string currencyCode, decimal price, int quantity, Dictionary properties) { + public static void LogPurchase(string productId, string currencyCode, decimal price, int quantity, Dictionary properties) { var propertiesString = Json.Serialize(properties); _logPurchase(productId, currencyCode, price.ToString(), quantity, propertiesString); } @@ -375,17 +379,38 @@ public static void LogCustomEvent(string eventName) { Appboy.Call("logCustomEvent", eventName); } - public static AndroidJavaObject ParsePropertiesToAppboyProperties(Dictionary properties) { + public static AndroidJavaObject ParsePropertiesToAppboyProperties(Dictionary properties) { AndroidJavaObject appboyProperties = new AndroidJavaObject("com.appboy.models.outgoing.AppboyProperties"); if (properties != null && properties.Count > 0) { - foreach (KeyValuePair entry in properties) { - appboyProperties.Call("addProperty", entry.Key, entry.Value); + foreach (KeyValuePair entry in properties) { + if (entry.Value == null) { + continue; + } + + // Public API only supports int/string/double/bool/DateTime. Other values can't get mapped + // to Android AppboyProperty methods without casting. + if (entry.Value.GetType() == typeof(int) || entry.Value.GetType() == typeof(string) || + entry.Value.GetType() == typeof(double) || entry.Value.GetType() == typeof(bool)) { + appboyProperties.Call("addProperty", entry.Key, entry.Value); + } else { + appboyProperties.Call("addProperty", entry.Key, entry.Value.ToString()); + } } } return appboyProperties; } - public static void LogCustomEvent(string eventName, Dictionary properties) { + /// + /// Logs a custom event for the user with the given properties. + /// + /// + /// The name of the custom event. + /// + /// + /// A properties dictionary. Values that are int/string/double/bool/DateTime will be passed to Android + /// and mapped to java types. All other values will be passed as strings. + /// + public static void LogCustomEvent(string eventName, Dictionary properties) { AndroidJavaObject appboyProperties = ParsePropertiesToAppboyProperties(properties); Appboy.Call("logCustomEvent", eventName, appboyProperties); } @@ -395,7 +420,7 @@ public static void LogPurchase(string productId, string currencyCode, decimal pr Appboy.Call("logPurchase", productId, currencyCode, javaPrice, quantity); } - public static void LogPurchase(string productId, string currencyCode, decimal price, int quantity, Dictionary properties) { + public static void LogPurchase(string productId, string currencyCode, decimal price, int quantity, Dictionary properties) { var javaPrice = new AndroidJavaObject("java.math.BigDecimal", price.ToString()); AndroidJavaObject appboyProperties = ParsePropertiesToAppboyProperties(properties); Appboy.Call("logPurchase", productId, currencyCode, javaPrice, quantity, appboyProperties); @@ -877,170 +902,8 @@ public static void LogFeedbackDisplayed() { WindowsUniversalUnityAdapter.AppboyAdapter.LogFeedbackDisplayed(); } -#elif UNITY_WP8 - void Start() { - Debug.Log("Starting Appboy binding for Windows Phone8 clients."); - } - - public static void LogCustomEvent(string eventName) { - WindowsPhone8UnityAdapter.AppboyAdapter.LogCustomEvent(eventName); - } - - public static void LogPurchase(string productId, string currencyCode, decimal price, int quantity) { - WindowsPhone8UnityAdapter.AppboyAdapter.LogPurchase(productId, currencyCode, price, quantity); - } - - public static void ChangeUser(string userId) { - WindowsPhone8UnityAdapter.AppboyAdapter.ChangeUser(userId); - } - - public static void SetUserFirstName(string firstName) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserFirstName(firstName); - } - - public static void SetUserLastName(string lastName) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserLastName(lastName); - } - - public static void SetUserEmail(string email) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserEmail(email); - } - - public static void SetUserBio(string bio) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserBio(bio); - } - - public static void SetUserGender(Gender gender) { - if (gender == Gender.Female) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserGender("FEMALE"); - } else { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserGender("MALE"); - } - } - - public static void SetUserDateOfBirth(int year, int month, int day) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserDateOfBirth(year, month, day); - } - - public static void SetUserCountry(string country) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserCountry(country); - } - - public static void SetUserHomeCity(string city) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserHomeCity(city); - } - - public static void SetUserIsSubscribedToEmails(bool isSubscribedToEmails) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserIsSubscribedToEmails(isSubscribedToEmails); - } - - public static void SetUserEmailNotificationSubscriptionType(AppboyNotificationSubscriptionType emailNotificationSubscriptionType) { - if (emailNotificationSubscriptionType == AppboyNotificationSubscriptionType.OPTED_IN) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserEmailNotificationSubscriptionType("OPTED_IN"); - } else if (emailNotificationSubscriptionType == AppboyNotificationSubscriptionType.SUBSCRIBED) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserEmailNotificationSubscriptionType("SUBSCRIBED"); - } else { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserEmailNotificationSubscriptionType("UNSUBSCRIBED"); - } - } - - public static void SetUserPushNotificationSubscriptionType(AppboyNotificationSubscriptionType pushNotificationSubscriptionType) { - if (pushNotificationSubscriptionType == AppboyNotificationSubscriptionType.OPTED_IN) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserPushNotificationSubscriptionType("OPTED_IN"); - } else if (pushNotificationSubscriptionType == AppboyNotificationSubscriptionType.SUBSCRIBED) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserPushNotificationSubscriptionType("SUBSCRIBED"); - } else { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserPushNotificationSubscriptionType("UNSUBSCRIBED"); - } - } - - public static void SetUserPhoneNumber(string phoneNumber) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserPhoneNumber(phoneNumber); - } - - public static void SetUserAvatarImageURL(string imageURL) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetUserAvatarImageURL(imageURL); - } - - public static void SetCustomUserAttribute(string key, bool value) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetCustomUserAttribute(key, value); - } - - public static void SetCustomUserAttribute(string key, int value) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetCustomUserAttribute(key, value); - } - - public static void SetCustomUserAttribute(string key, float value) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetCustomUserAttribute(key, value); - } - - public static void SetCustomUserAttribute(string key, string value) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetCustomUserAttribute(key, value); - } - - public static void SetCustomUserAttributeToNow(string key) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetCustomUserAttributeToNow(key); - } - - public static void SetCustomUserAttributeToSecondsFromEpoch(string key, long secondsFromEpoch) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetCustomUserAttributeToSecondsFromEpoch(key, secondsFromEpoch); - } - - public static void UnsetCustomUserAttribute(string key) { - WindowsPhone8UnityAdapter.AppboyAdapter.UnsetCustomUserAttribute(key); - } - - public static void IncrementCustomUserAttribute(string key, int incrementValue) { - WindowsPhone8UnityAdapter.AppboyAdapter.IncrementCustomUserAttribute(key, incrementValue); - } - - public static void SetCustomUserAttributeArray(string key, List array, int size) { - WindowsPhone8UnityAdapter.AppboyAdapter.SetCustomUserAttributeArray(key, array, size); - } - - public static void AddToCustomUserAttributeArray(string key, string value) { - WindowsPhone8UnityAdapter.AppboyAdapter.AddToCustomUserAttributeArray(key, value); - } - - public static void RemoveFromCustomUserAttributeArray(string key, string value) { - WindowsPhone8UnityAdapter.AppboyAdapter.RemoveFromCustomUserAttributeArray(key, value); - } - - public static void SubmitFeedback(string replyToEmail, string message, bool isReportingABug) { - WindowsPhone8UnityAdapter.AppboyAdapter.SubmitFeedback(replyToEmail, message, isReportingABug); - } - - public static void RequestSlideup() { - WindowsPhone8UnityAdapter.AppboyAdapter.RequestSlideup(); - } - - public static void RequestFeedRefresh() { - WindowsPhone8UnityAdapter.AppboyAdapter.RequestFeedRefresh(); - } - - public static void RequestFeedRefreshFromCache() { - WindowsPhone8UnityAdapter.AppboyAdapter.RequestFeedRefreshFromCache(); - } - - public static void LogSlideupClicked(string slideupJSONString) { - WindowsPhone8UnityAdapter.AppboyAdapter.LogSlideupClicked(slideupJSONString); - } - - public static void LogSlideupImpression(string slideupJSONString) { - WindowsPhone8UnityAdapter.AppboyAdapter.LogSlideupImpression(slideupJSONString); - } - - public static void LogFeedDisplayed() { - WindowsPhone8UnityAdapter.AppboyAdapter.LogFeedDisplayed(); - } - - public static void LogFeedbackDisplayed() { - WindowsPhone8UnityAdapter.AppboyAdapter.LogFeedbackDisplayed(); - } - #else - // Empty implementations of the API, in case the application is being compiled for a platform other than iOS or Android. void Start() { Debug.Log("Starting no-op Appboy binding for non iOS/Android clients."); @@ -1049,13 +912,13 @@ void Start() { public static void LogCustomEvent(string eventName) { } - public static void LogCustomEvent(string eventName, Dictionary properties) { + public static void LogCustomEvent(string eventName, Dictionary properties) { } public static void LogPurchase(string productId, string currencyCode, decimal price, int quantity) { } - public static void LogPurchase(string productId, string currencyCode, decimal price, int quantity, Dictionary properties) { + public static void LogPurchase(string productId, string currencyCode, decimal price, int quantity, Dictionary properties) { } public static void ChangeUser(string userId) { diff --git a/Assets/Plugins/Appboy/Editor/AppboyConfig.cs b/Assets/Plugins/Appboy/Editor/AppboyConfig.cs new file mode 100644 index 000000000..fff0be6d3 --- /dev/null +++ b/Assets/Plugins/Appboy/Editor/AppboyConfig.cs @@ -0,0 +1,158 @@ +using System; +using System.IO; +using UnityEngine; +using UnityEditor; + +namespace Appboy.Editor { + [Serializable] + public class AppboyConfig : ScriptableObject { + private const string AssetName = "AppboyConfig"; + private const string AssetPath = "Resources"; + private const string AssetExtension = ".asset"; + + // Singleton instance + private static AppboyConfig instance; + + // Automate Unity iOS integration + [SerializeField] + private bool iOSAutomatesIntegration = false; + + // App Startup + [SerializeField] + private string apiKey = string.Empty; + + // Push Notifications + [SerializeField] + private bool iOSIntegratesPush = false; + [SerializeField] + private bool iOSDisableAutomaticPushRegistration = false; + [SerializeField] + private bool iOSPushIsBackgroundEnabled = false; + [SerializeField] + private string iOSPushReceivedGameObjectName = string.Empty; + [SerializeField] + private string iOSPushReceivedCallbackMethodName = string.Empty; + [SerializeField] + private string iOSPushOpenedGameObjectName = string.Empty; + [SerializeField] + private string iOSPushOpenedCallbackMethodName = string.Empty; + + // In-App Messages + [SerializeField] + private string iOSInAppMessageGameObjectName = string.Empty; + [SerializeField] + private string iOSInAppMessageCallbackMethodName = string.Empty; + [SerializeField] + private bool iOSDisplayInAppMessages = false; + + // News Feed + [SerializeField] + private string iOSFeedGameObjectName = string.Empty; + [SerializeField] + private string iOSFeedCallbackMethodName = string.Empty; + + public static bool IOSAutomatesIntegration { + get { return Instance.iOSAutomatesIntegration; } + set { SetProperty(ref Instance.iOSAutomatesIntegration, value); } + } + + public static string ApiKey { + get { return Instance.apiKey; } + set { SetProperty(ref Instance.apiKey, value); } + } + + // Push + public static bool IOSIntegratesPush { + get { return Instance.iOSIntegratesPush; } + set { SetProperty(ref Instance.iOSIntegratesPush, value); } + } + + public static bool IOSDisableAutomaticPushRegistration { + get { return Instance.iOSDisableAutomaticPushRegistration; } + set { SetProperty(ref Instance.iOSDisableAutomaticPushRegistration, value); } + } + + public static string IOSPushReceivedGameObjectName { + get { return Instance.iOSPushReceivedGameObjectName; } + set { SetProperty(ref Instance.iOSPushReceivedGameObjectName, value); } + } + + public static string IOSPushReceivedCallbackMethodName { + get { return Instance.iOSPushReceivedCallbackMethodName; } + set { SetProperty(ref Instance.iOSPushReceivedCallbackMethodName, value); } + } + + public static string IOSPushOpenedGameObjectName { + get { return Instance.iOSPushOpenedGameObjectName; } + set { SetProperty(ref Instance.iOSPushOpenedGameObjectName, value); } + } + + public static string IOSPushOpenedCallbackMethodName { + get { return Instance.iOSPushOpenedCallbackMethodName; } + set { SetProperty(ref Instance.iOSPushOpenedCallbackMethodName, value); } + } + + public static bool IOSPushIsBackgroundEnabled { + get { return Instance.iOSPushIsBackgroundEnabled; } + set { SetProperty(ref Instance.iOSPushIsBackgroundEnabled, value); } + } + + // In-App Messages + public static string IOSInAppMessageGameObjectName { + get { return Instance.iOSInAppMessageGameObjectName; } + set { SetProperty(ref Instance.iOSInAppMessageGameObjectName, value); } + } + + public static string IOSInAppMessageCallbackMethodName { + get { return Instance.iOSInAppMessageCallbackMethodName; } + set { SetProperty(ref Instance.iOSInAppMessageCallbackMethodName, value); } + } + + public static bool IOSDisplayInAppMessages { + get { return Instance.iOSDisplayInAppMessages; } + set { SetProperty(ref Instance.iOSDisplayInAppMessages, value); } + } + + // News Feed + public static string IOSFeedGameObjectName { + get { return Instance.iOSFeedGameObjectName; } + set { SetProperty(ref Instance.iOSFeedGameObjectName, value); } + } + + public static string IOSFeedCallbackMethodName { + get { return Instance.iOSFeedCallbackMethodName; } + set { SetProperty(ref Instance.iOSFeedCallbackMethodName, value); } + } + + // Setter utility method + private static void SetProperty(ref T oldValue, T newValue) { + if (!Equals(oldValue, newValue)) { + oldValue = newValue; + // Tell Unity to save asset changes + EditorUtility.SetDirty(Instance); + } + } + + private static AppboyConfig Instance { + get { + if (!instance) { + // Try to load from assets + instance = Resources.Load(AssetName) as AppboyConfig; + + if (!instance) { + // Instantiate an instance + instance = ScriptableObject.CreateInstance(); + string directoryPath = Path.Combine(Application.dataPath, AssetPath); + if (!Directory.Exists(directoryPath)) { + Directory.CreateDirectory(directoryPath); + } + string fullAssetPath = Path.Combine("Assets", Path.Combine(AssetPath, AssetName + AssetExtension)); + AssetDatabase.CreateAsset(instance, fullAssetPath); + AssetDatabase.SaveAssets(); + } + } + return instance; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Appboy/Editor/AppboyConfigEditor.cs b/Assets/Plugins/Appboy/Editor/AppboyConfigEditor.cs new file mode 100644 index 000000000..449735094 --- /dev/null +++ b/Assets/Plugins/Appboy/Editor/AppboyConfigEditor.cs @@ -0,0 +1,111 @@ +using System; +using UnityEditor; +using UnityEngine; + +namespace Appboy.Editor { + public class AppboyConfigEditor : EditorWindow { + private AppboyConfig instance; + private bool showPushOpenedListener = true; + private bool showPushReceivedListener = true; + private bool showInAppMessageListener = true; + private bool showFeedListener = true; + private Vector2 scrollPosition; + + [MenuItem("Appboy/Appboy Configuration")] + static void Init() { + AppboyConfigEditor editor = (AppboyConfigEditor)EditorWindow.GetWindow(typeof (AppboyConfigEditor)); + editor.Show(); + } + + void OnGUI() { + EditorGUIUtility.labelWidth = 175; + scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition); + IOSBuildGUI(); + EditorGUILayout.EndScrollView(); + } + + private void ApiKeyGUI() { + EditorGUILayout.BeginVertical(); + AppboyConfig.ApiKey = EditorGUILayout.TextField("Appboy API Key", AppboyConfig.ApiKey); + EditorGUILayout.EndVertical(); + } + + private void IOSBuildGUI() { + AppboyConfig.IOSAutomatesIntegration = EditorGUILayout.ToggleLeft(" Automate Unity iOS Integration", AppboyConfig.IOSAutomatesIntegration, EditorStyles.boldLabel); + EditorGUILayout.Separator(); + + if (AppboyConfig.IOSAutomatesIntegration) { + EditorGUI.indentLevel++; + + // API Key + ApiKeyGUI(); + EditorGUILayout.Separator(); + + // Push Notifications + EditorGUILayout.BeginVertical(); + EditorGUILayout.LabelField("Push Notifications", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + + AppboyConfig.IOSIntegratesPush = EditorGUILayout.ToggleLeft(" Integrate Push With Appboy", AppboyConfig.IOSIntegratesPush); + EditorGUILayout.LabelField("Registers users for push notifications, passes push tokens to Appboy and tracks push opens.", EditorStyles.wordWrappedMiniLabel); + + AppboyConfig.IOSDisableAutomaticPushRegistration = EditorGUILayout.ToggleLeft(" Disable Automatic Push Registration", AppboyConfig.IOSDisableAutomaticPushRegistration); + if (AppboyConfig.IOSDisableAutomaticPushRegistration) { + EditorGUILayout.LabelField("You will need to manually prompt users for push registration.", EditorStyles.miniBoldLabel); + } else { + EditorGUILayout.LabelField("Disables automatic user registration for push notifications upon app startup.", EditorStyles.wordWrappedMiniLabel); + } + + AppboyConfig.IOSPushIsBackgroundEnabled = EditorGUILayout.ToggleLeft(" Enable Background Push", AppboyConfig.IOSPushIsBackgroundEnabled); + EditorGUILayout.LabelField("Allows the system to wake your app from suspension when a push notification arrives.", EditorStyles.wordWrappedMiniLabel); + + showPushReceivedListener = EditorGUILayout.Foldout(showPushReceivedListener, "Set Push Received Listener"); + if (showPushReceivedListener) { + EditorGUI.indentLevel++; + AppboyConfig.IOSPushReceivedGameObjectName = EditorGUILayout.TextField("Game Object Name", AppboyConfig.IOSPushReceivedGameObjectName); + AppboyConfig.IOSPushReceivedCallbackMethodName = EditorGUILayout.TextField("Callback Method Name", AppboyConfig.IOSPushReceivedCallbackMethodName); + EditorGUI.indentLevel--; + } + + showPushOpenedListener = EditorGUILayout.Foldout(showPushOpenedListener, "Set Push Opened Listener"); + if (showPushOpenedListener) { + EditorGUI.indentLevel++; + AppboyConfig.IOSPushOpenedGameObjectName = EditorGUILayout.TextField("Game Object Name", AppboyConfig.IOSPushOpenedGameObjectName); + AppboyConfig.IOSPushOpenedCallbackMethodName = EditorGUILayout.TextField("Callback Method Name", AppboyConfig.IOSPushOpenedCallbackMethodName); + EditorGUI.indentLevel--; + } + EditorGUI.indentLevel--; + EditorGUILayout.Separator(); + + // In-App Messages + EditorGUILayout.LabelField("In-App Messages", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + showInAppMessageListener = EditorGUILayout.Foldout(showInAppMessageListener, "Set In-App Message Listener"); + if (showInAppMessageListener) { + EditorGUI.indentLevel++; + AppboyConfig.IOSInAppMessageGameObjectName = EditorGUILayout.TextField("Game Object Name", AppboyConfig.IOSInAppMessageGameObjectName); + AppboyConfig.IOSInAppMessageCallbackMethodName = EditorGUILayout.TextField("Callback Method Name", AppboyConfig.IOSInAppMessageCallbackMethodName); + if (!String.IsNullOrEmpty(AppboyConfig.IOSInAppMessageGameObjectName.Trim()) && !String.IsNullOrEmpty(AppboyConfig.IOSInAppMessageCallbackMethodName.Trim())) { + AppboyConfig.IOSDisplayInAppMessages = EditorGUILayout.ToggleLeft(" Appboy Displays In-App Messages", AppboyConfig.IOSDisplayInAppMessages); + } + EditorGUI.indentLevel--; + } + EditorGUI.indentLevel--; + EditorGUILayout.Separator(); + + // News Feed + EditorGUILayout.LabelField("News Feed", EditorStyles.boldLabel); + EditorGUI.indentLevel++; + showFeedListener = EditorGUILayout.Foldout(showFeedListener, "Set News Feed Listener"); + if (showFeedListener) { + EditorGUI.indentLevel++; + AppboyConfig.IOSFeedGameObjectName = EditorGUILayout.TextField("Game Object Name", AppboyConfig.IOSFeedGameObjectName); + AppboyConfig.IOSFeedCallbackMethodName = EditorGUILayout.TextField("Callback Method Name", AppboyConfig.IOSFeedCallbackMethodName); + EditorGUI.indentLevel--; + } + EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Appboy/Editor/PostBuild.cs b/Assets/Plugins/Appboy/Editor/PostBuild.cs new file mode 100644 index 000000000..747d4cecf --- /dev/null +++ b/Assets/Plugins/Appboy/Editor/PostBuild.cs @@ -0,0 +1,184 @@ +using System; +using System.IO; +using System.Text.RegularExpressions; +using UnityEngine; +using UnityEditor; +using UnityEditor.Callbacks; +using UnityEditor.iOS.Xcode; + +namespace Appboy.Editor { + public class PostBuild { +#if UNITY_IOS + private const string ProjectSubpath = "/Unity-iPhone.xcodeproj/project.pbxproj"; + private const string AppboyAppDelegatePath = "Libraries/Plugins/iOS/AppboyAppDelegate.mm"; + private const string PlistSubpath = "/Info.plist"; + + private const string ABKUnityApiKey = "ApiKey"; + private const string ABKUnityAutomaticPushIntegrationKey = "IntegratesPush"; + private const string ABKUnityDisableAutomaticPushRegistrationKey = "DisableAutomaticPushRegistration"; + private const string ABKUnitySetPushListenerKey = "SetPushListener"; + private const string ABKUnityPushReceivedGameObjectKey = "PushReceivedGameObjectName"; + private const string ABKUnityPushReceivedCallbackKey = "PushReceivedCallbackMethodName"; + private const string ABKUnityPushOpenedGameObjectKey = "PushOpenedGameObjectName"; + private const string ABKUnityPushOpenedCallbackKey = "PushOpenedCallbackMethodName"; + private const string ABKUnityInAppMessageGameObjectKey = "InAppMessageGameObjectName"; + private const string ABKUnityInAppMessageCallbackKey = "InAppMessageCallbackMethodName"; + private const string ABKUnityFeedGameObjectKey = "FeedGameObjectName"; + private const string ABKUnityFeedCallbackKey = "FeedCallbackMethodName"; + private const string ABKUnityHandleInAppMessageDisplayKey = "DisplayInAppMessages"; + + [PostProcessBuildAttribute(1)] + public static void OnPostprocessBuild(BuildTarget target, string buildPath) { + if (target == BuildTarget.iOS) { + ModifyProject(buildPath + ProjectSubpath); + ModifyPlist(buildPath + PlistSubpath); + } + } + + private static void ModifyProject(string projectPath) { + // Create PBXProject + PBXProject project = new PBXProject(); + project.ReadFromString(File.ReadAllText(projectPath)); + + if (!AppboyConfig.IOSAutomatesIntegration) { + // Remove AppboyAppDelegate.mm from PBXProject + Debug.Log("Removing AppboyAppDelegate.mm from " + AppboyAppDelegatePath); + string appboyAppDelegateGuid = project.FindFileGuidByProjectPath(AppboyAppDelegatePath); + project.RemoveFile(appboyAppDelegateGuid); + } else { + // Get project targets using Unity's default app target names + string[] targets = { + project.TargetGuidByName(PBXProject.GetUnityTargetName()), + project.TargetGuidByName(PBXProject.GetUnityTestTargetName()) + }; + + string[] requiredFrameworks = { + "SystemConfiguration.framework", + "QuartzCore.framework", + "libz.tbd", + "CoreImage.framework", + "CoreText.framework" + }; + + string[] optionalFrameworks = { + "CoreTelephony.framework", + "Social.framework", + "Accounts.framework", + "AdSupport.framework", + "StoreKit.framework", + "CoreLocation.framework", // optional for location tracking + "ImageIO.framework" // required by SDWebImage + }; + + foreach (string target in targets) { + // Modify build properties + project.AddBuildProperty(target, "OTHER_LDFLAGS", "-ObjC"); + project.AddBuildProperty(target, "FRAMEWORK_SEARCH_PATHS", "./Frameworks/Plugins/iOS"); + project.AddBuildProperty(target, "FRAMEWORK_SEARCH_PATHS", "./Libraries/Plugins/iOS"); + project.AddBuildProperty(target, "FRAMEWORK_SEARCH_PATHS", "./Libraries"); + + // Add required frameworks + // Note: Unity's documentation for PBXProject.AddFrameworkToProject says that the boolean parameter + // should be true if required and false if optional, but actual behavior appears to be the exact opposite. + foreach (string framework in requiredFrameworks) { + project.AddFrameworkToProject(target, framework, false); + } + + foreach (string framework in optionalFrameworks) { + project.AddFrameworkToProject(target, framework, true); + } + } + } + + // Write changes to XCode project + File.WriteAllText(projectPath, project.WriteToString()); + } + + private static void ModifyPlist(string plistPath) { + // Create PlistDocument + PlistDocument plist = new PlistDocument(); + plist.ReadFromString(File.ReadAllText(plistPath)); + PlistElementDict rootDict = plist.root; + + // Clear existing Appboy Unity dictionary + if (rootDict["Appboy"] != null) { + rootDict["Appboy"]["Unity"] = null; + } + + // Add Appboy Unity keys to Plist + if (AppboyConfig.IOSAutomatesIntegration) { + // The Appboy Unity dictionary + PlistElementDict appboyUnityDict = (rootDict["Appboy"] == null) ? rootDict.CreateDict("Appboy").CreateDict("Unity") : rootDict["Appboy"].AsDict().CreateDict("Unity"); + + // Add iOS automated integration build keys to Plist + if (ValidateField(ABKUnityApiKey, AppboyConfig.ApiKey, "Appboy will not be initialized.")) { + appboyUnityDict.SetString(ABKUnityApiKey, AppboyConfig.ApiKey.Trim()); + } + appboyUnityDict.SetBoolean(ABKUnityAutomaticPushIntegrationKey, AppboyConfig.IOSIntegratesPush); + appboyUnityDict.SetBoolean(ABKUnityDisableAutomaticPushRegistrationKey, AppboyConfig.IOSDisableAutomaticPushRegistration); + if (AppboyConfig.IOSPushIsBackgroundEnabled) { + PlistElementArray backgroundModes = (rootDict["UIBackgroundModes"] == null) ? rootDict.CreateArray("UIBackgroundModes") : rootDict["UIBackgroundModes"].AsArray(); + backgroundModes.AddString("remote-notification"); + } + + // Set push listeners + if (ValidateListenerFields(ABKUnityPushReceivedGameObjectKey, AppboyConfig.IOSPushReceivedGameObjectName, + ABKUnityPushReceivedCallbackKey, AppboyConfig.IOSPushReceivedCallbackMethodName)) { + appboyUnityDict.SetString(ABKUnityPushReceivedGameObjectKey, AppboyConfig.IOSPushReceivedGameObjectName.Trim()); + appboyUnityDict.SetString(ABKUnityPushReceivedCallbackKey, AppboyConfig.IOSPushReceivedCallbackMethodName.Trim()); + } + + if (ValidateListenerFields(ABKUnityPushOpenedGameObjectKey, AppboyConfig.IOSPushOpenedGameObjectName, + ABKUnityPushOpenedCallbackKey, AppboyConfig.IOSPushOpenedCallbackMethodName)) { + appboyUnityDict.SetString(ABKUnityPushOpenedGameObjectKey, AppboyConfig.IOSPushOpenedGameObjectName.Trim()); + appboyUnityDict.SetString(ABKUnityPushOpenedCallbackKey, AppboyConfig.IOSPushOpenedCallbackMethodName.Trim()); + } + + // Set in-app message listener + if (ValidateListenerFields(ABKUnityInAppMessageGameObjectKey, AppboyConfig.IOSInAppMessageGameObjectName, + ABKUnityInAppMessageCallbackKey, AppboyConfig.IOSInAppMessageCallbackMethodName)) { + appboyUnityDict.SetString(ABKUnityInAppMessageGameObjectKey, AppboyConfig.IOSInAppMessageGameObjectName.Trim()); + appboyUnityDict.SetString(ABKUnityInAppMessageCallbackKey, AppboyConfig.IOSInAppMessageCallbackMethodName.Trim()); + appboyUnityDict.SetBoolean(ABKUnityHandleInAppMessageDisplayKey, AppboyConfig.IOSDisplayInAppMessages); + } + + // Set feed listener + if (ValidateListenerFields(ABKUnityFeedGameObjectKey, AppboyConfig.IOSFeedGameObjectName, + ABKUnityFeedCallbackKey, AppboyConfig.IOSFeedCallbackMethodName)) { + appboyUnityDict.SetString(ABKUnityFeedGameObjectKey, AppboyConfig.IOSFeedGameObjectName.Trim()); + appboyUnityDict.SetString(ABKUnityFeedCallbackKey, AppboyConfig.IOSFeedCallbackMethodName.Trim()); + } + } + + // Write changes to XCode project and Info.plist + File.WriteAllText(plistPath, plist.WriteToString()); + } + + private static void DisplayInvalidSettingsWarning(string key, string details) { + EditorUtility.DisplayDialog("Invalid Appboy Settings", "The " + Regex.Replace(key, @"\B[A-Z]", " $0") + " is blank. " + details + " Set this field in Appboy > Appboy Configuration.", "OK"); + } + + private static bool ValidateField(string key, string value, string errorDetails) { + if (String.IsNullOrEmpty(value.Trim())) { + DisplayInvalidSettingsWarning(key, errorDetails); + return false; + } + return true; + } + + private static bool ValidateListenerFields(string key1, string value1, string key2, string value2) { + bool value1isValid = !String.IsNullOrEmpty(value1.Trim()); + bool value2isValid = !String.IsNullOrEmpty(value2.Trim()); + string invalidKey; + if (value1isValid && value2isValid) { + return true; + } else if (value1isValid || value2isValid) { + // Display invalid listener field alert + invalidKey = value1isValid ? key2 : key1; + DisplayInvalidSettingsWarning(invalidKey, "Listener will not be set."); + } + return false; + } +#endif + } +} diff --git a/Plugins/Appboy/Tests/AppboyBindingTester.cs b/Assets/Plugins/Appboy/Tests/AppboyBindingTester.cs similarity index 100% rename from Plugins/Appboy/Tests/AppboyBindingTester.cs rename to Assets/Plugins/Appboy/Tests/AppboyBindingTester.cs diff --git a/Plugins/Appboy/Tests/ApplePushNotificationTester.cs b/Assets/Plugins/Appboy/Tests/ApplePushNotificationTester.cs similarity index 100% rename from Plugins/Appboy/Tests/ApplePushNotificationTester.cs rename to Assets/Plugins/Appboy/Tests/ApplePushNotificationTester.cs diff --git a/Plugins/Appboy/Utilities/CollectionUtils.cs b/Assets/Plugins/Appboy/Utilities/CollectionUtils.cs similarity index 100% rename from Plugins/Appboy/Utilities/CollectionUtils.cs rename to Assets/Plugins/Appboy/Utilities/CollectionUtils.cs diff --git a/Plugins/Appboy/Utilities/ColorUtils.cs b/Assets/Plugins/Appboy/Utilities/ColorUtils.cs similarity index 100% rename from Plugins/Appboy/Utilities/ColorUtils.cs rename to Assets/Plugins/Appboy/Utilities/ColorUtils.cs diff --git a/Plugins/Appboy/Utilities/EnumUtils.cs b/Assets/Plugins/Appboy/Utilities/EnumUtils.cs similarity index 100% rename from Plugins/Appboy/Utilities/EnumUtils.cs rename to Assets/Plugins/Appboy/Utilities/EnumUtils.cs diff --git a/Plugins/Appboy/Utilities/JsonUtils.cs b/Assets/Plugins/Appboy/Utilities/JsonUtils.cs similarity index 100% rename from Plugins/Appboy/Utilities/JsonUtils.cs rename to Assets/Plugins/Appboy/Utilities/JsonUtils.cs diff --git a/Plugins/Appboy/Utilities/MiniJson.cs b/Assets/Plugins/Appboy/Utilities/MiniJson.cs similarity index 100% rename from Plugins/Appboy/Utilities/MiniJson.cs rename to Assets/Plugins/Appboy/Utilities/MiniJson.cs diff --git a/Plugins/Appboy/Utilities/SimpleJSON.cs b/Assets/Plugins/Appboy/Utilities/SimpleJSON.cs similarity index 100% rename from Plugins/Appboy/Utilities/SimpleJSON.cs rename to Assets/Plugins/Appboy/Utilities/SimpleJSON.cs diff --git a/Plugins/Appboy/models/AppboyNotificationSubscriptionType.cs b/Assets/Plugins/Appboy/models/AppboyNotificationSubscriptionType.cs similarity index 100% rename from Plugins/Appboy/models/AppboyNotificationSubscriptionType.cs rename to Assets/Plugins/Appboy/models/AppboyNotificationSubscriptionType.cs diff --git a/Plugins/Appboy/models/ApplePushNotification.cs b/Assets/Plugins/Appboy/models/ApplePushNotification.cs similarity index 100% rename from Plugins/Appboy/models/ApplePushNotification.cs rename to Assets/Plugins/Appboy/models/ApplePushNotification.cs diff --git a/Plugins/Appboy/models/ApplePushNotificationAlert.cs b/Assets/Plugins/Appboy/models/ApplePushNotificationAlert.cs similarity index 100% rename from Plugins/Appboy/models/ApplePushNotificationAlert.cs rename to Assets/Plugins/Appboy/models/ApplePushNotificationAlert.cs diff --git a/Plugins/Appboy/models/CardCategory.cs b/Assets/Plugins/Appboy/models/CardCategory.cs similarity index 100% rename from Plugins/Appboy/models/CardCategory.cs rename to Assets/Plugins/Appboy/models/CardCategory.cs diff --git a/Plugins/Appboy/models/Cards/BannerCard.cs b/Assets/Plugins/Appboy/models/Cards/BannerCard.cs similarity index 70% rename from Plugins/Appboy/models/Cards/BannerCard.cs rename to Assets/Plugins/Appboy/models/Cards/BannerCard.cs index ce023ec54..412827853 100755 --- a/Plugins/Appboy/models/Cards/BannerCard.cs +++ b/Assets/Plugins/Appboy/models/Cards/BannerCard.cs @@ -23,9 +23,8 @@ public BannerCard(JSONClass json) : base(json) { } public override string ToString() { - return String.Format("BannerCard[ID={0}, Type={1}, ImageUrl={2}, Viewed={3}, Created={4}, " + - "Updated={5}, Url={6}, Domain={7}, Categories={8}]", - ID, Type, ImageUrl, Viewed, Created, Updated, Url, Domain, CategoriesToString()); + return String.Format("BannerCard[{0}, ImageUrl={1}, Url={2}, Domain={3}]", + base.ToString(), ImageUrl, Url, Domain); } } } \ No newline at end of file diff --git a/Plugins/Appboy/models/Cards/CaptionedImageCard.cs b/Assets/Plugins/Appboy/models/Cards/CaptionedImageCard.cs similarity index 73% rename from Plugins/Appboy/models/Cards/CaptionedImageCard.cs rename to Assets/Plugins/Appboy/models/Cards/CaptionedImageCard.cs index ecb6864a1..ced3bde07 100755 --- a/Plugins/Appboy/models/Cards/CaptionedImageCard.cs +++ b/Assets/Plugins/Appboy/models/Cards/CaptionedImageCard.cs @@ -29,9 +29,9 @@ public CaptionedImageCard(JSONClass json) : base(json) { } public override string ToString() { - return String.Format("CaptionedImageCard: ID={0}, Type={1}, Description={2}, ImageUrl={3}, Viewed={4}, " + - "Created={5}, Updated={6}, Title={7}, Url={8}, Domain={9}, Categories={10}", - ID, Type, Description, ImageUrl, Viewed, Created, Updated, Title, Url, Domain, CategoriesToString()); + return String.Format("CaptionedImageCard:[{0}, Description={1}, ImageUrl={2}, " + + "Title={3}, Url={4}, Domain={5}]", + base.ToString(), Description, ImageUrl, Title, Url, Domain); } } } diff --git a/Plugins/Appboy/models/Cards/Card.cs b/Assets/Plugins/Appboy/models/Cards/Card.cs similarity index 81% rename from Plugins/Appboy/models/Cards/Card.cs rename to Assets/Plugins/Appboy/models/Cards/Card.cs index 4d43e2945..73e652eff 100755 --- a/Plugins/Appboy/models/Cards/Card.cs +++ b/Assets/Plugins/Appboy/models/Cards/Card.cs @@ -20,6 +20,8 @@ public class Card { public string JsonString { get; private set; } + public Dictionary Extras { get; set; } + public Card(JSONClass json) { if (json == null) { throw new ArgumentNullException("json"); @@ -33,6 +35,9 @@ public Card(JSONClass json) { Viewed = json["viewed"].AsBool; Created = json["created"].AsInt; Updated = json["updated"].AsInt; + if (json["extras"] != null) { + Extras = JsonUtils.JSONClassToDictionary(json["extras"].AsObject); + } Categories = new HashSet(); if (json["categories"] == null) { Categories.Add(CardCategory.NO_CATEGORY); @@ -52,6 +57,13 @@ public Card(JSONClass json) { } + public override string ToString() { + return String.Format("{0}: ID={1}, Type={2}, Viewed={3}, Created={4}, Extras={5}, Updated={6}" + + "Categories={7}", + this.GetType().Name, ID, Type, Viewed, Created, CollectionUtils.DictionaryToString(Extras), + Updated, CategoriesToString()); + } + public void LogImpression() { if (!string.IsNullOrEmpty(ID)) { #if UNITY_ANDROID diff --git a/Plugins/Appboy/models/Cards/ClassicCard.cs b/Assets/Plugins/Appboy/models/Cards/ClassicCard.cs similarity index 74% rename from Plugins/Appboy/models/Cards/ClassicCard.cs rename to Assets/Plugins/Appboy/models/Cards/ClassicCard.cs index 37791c82a..03ec228a7 100755 --- a/Plugins/Appboy/models/Cards/ClassicCard.cs +++ b/Assets/Plugins/Appboy/models/Cards/ClassicCard.cs @@ -32,9 +32,9 @@ public ClassicCard(JSONClass json) : base(json) { } public override string ToString() { - return String.Format("ClassicCard[ID={0}, Type={1}, Description={2}, ImageUrl={3}, Viewed={4}, " + - "Created={5}, Updated={6}, Title={7}, Url={8}, Domain={9}, Categories={10}", - ID, Type, Description, ImageUrl, Viewed, Created, Updated, Title, Url, Domain, CategoriesToString()); + return String.Format("ClassicCard[{0}, Description={1}, ImageUrl={2}, " + + "Title={3}, Url={4}, Domain={5}", + base.ToString(), Description, ImageUrl, Title, Url, Domain); } } } diff --git a/Plugins/Appboy/models/Cards/CrossPromotionSmall.cs b/Assets/Plugins/Appboy/models/Cards/CrossPromotionSmall.cs similarity index 84% rename from Plugins/Appboy/models/Cards/CrossPromotionSmall.cs rename to Assets/Plugins/Appboy/models/Cards/CrossPromotionSmall.cs index 11ab762a1..ce314942c 100755 --- a/Plugins/Appboy/models/Cards/CrossPromotionSmall.cs +++ b/Assets/Plugins/Appboy/models/Cards/CrossPromotionSmall.cs @@ -59,9 +59,9 @@ public CrossPromotionSmallCard(JSONClass json) : base(json) { } public override string ToString() { - string partial = String.Format("CrossPromotionSmallCard[ID={0}, Type={1}, Title={2}, Subtitle={3}, Caption={4}, " + - "ImageUrl={5}, Rating={6}, ReviewCount={7}, Price={8}, Viewed={9}, Created={10}, Updated={11}, Categories={12}, uri={13}", - ID, Type, Title, Subtitle, Caption, ImageUrl, Rating, ReviewCount, Price, Viewed, Created, Updated, CategoriesToString(), Url); + string partial = String.Format("CrossPromotionSmallCard[{0}, Title={1}, Subtitle={2}, Caption={3}, " + + "ImageUrl={4}, Rating={5}, ReviewCount={6}, Price={7}, uri={8}", + base.ToString(), Title, Subtitle, Caption, ImageUrl, Rating, ReviewCount, Price, Url); string platformSpecific = "]"; #if UNITY_ANDROID platformSpecific = String.Format("Package={0}]", Package); diff --git a/Plugins/Appboy/models/Cards/TextAnnouncementCard.cs b/Assets/Plugins/Appboy/models/Cards/TextAnnouncementCard.cs similarity index 72% rename from Plugins/Appboy/models/Cards/TextAnnouncementCard.cs rename to Assets/Plugins/Appboy/models/Cards/TextAnnouncementCard.cs index 6e0e546ef..14827ba05 100755 --- a/Plugins/Appboy/models/Cards/TextAnnouncementCard.cs +++ b/Assets/Plugins/Appboy/models/Cards/TextAnnouncementCard.cs @@ -26,9 +26,8 @@ public TextAnnouncementCard(JSONClass json) : base(json) { } public override string ToString() { - return String.Format("TextAnnouncementCard[ID={0}, Type={1}, Title={2}, Description={3}, " + - "Viewed={4}, Created={5}, Updated={6}, Url={7}, Domain={8}, Categories={9}", - ID, Type, Title, Description, Viewed, Created, Updated, Url, Domain, CategoriesToString()); + return String.Format("TextAnnouncementCard[{0}, Title={1}, Description={2}, Url={3}, Domain={4}]", + base.ToString(), Title, Description, Url, Domain); } } } \ No newline at end of file diff --git a/Plugins/Appboy/models/ClickAction.cs b/Assets/Plugins/Appboy/models/ClickAction.cs similarity index 100% rename from Plugins/Appboy/models/ClickAction.cs rename to Assets/Plugins/Appboy/models/ClickAction.cs diff --git a/Plugins/Appboy/models/DismissType.cs b/Assets/Plugins/Appboy/models/DismissType.cs similarity index 100% rename from Plugins/Appboy/models/DismissType.cs rename to Assets/Plugins/Appboy/models/DismissType.cs diff --git a/Plugins/Appboy/models/Feed.cs b/Assets/Plugins/Appboy/models/Feed.cs similarity index 100% rename from Plugins/Appboy/models/Feed.cs rename to Assets/Plugins/Appboy/models/Feed.cs diff --git a/Plugins/Appboy/models/Gender.cs b/Assets/Plugins/Appboy/models/Gender.cs similarity index 100% rename from Plugins/Appboy/models/Gender.cs rename to Assets/Plugins/Appboy/models/Gender.cs diff --git a/Plugins/Appboy/models/InAppMessage/IInAppMessage.cs b/Assets/Plugins/Appboy/models/InAppMessage/IInAppMessage.cs similarity index 100% rename from Plugins/Appboy/models/InAppMessage/IInAppMessage.cs rename to Assets/Plugins/Appboy/models/InAppMessage/IInAppMessage.cs diff --git a/Plugins/Appboy/models/InAppMessage/IInAppMessageImmersive.cs b/Assets/Plugins/Appboy/models/InAppMessage/IInAppMessageImmersive.cs similarity index 100% rename from Plugins/Appboy/models/InAppMessage/IInAppMessageImmersive.cs rename to Assets/Plugins/Appboy/models/InAppMessage/IInAppMessageImmersive.cs diff --git a/Plugins/Appboy/models/InAppMessage/InAppMessageBase.cs b/Assets/Plugins/Appboy/models/InAppMessage/InAppMessageBase.cs similarity index 100% rename from Plugins/Appboy/models/InAppMessage/InAppMessageBase.cs rename to Assets/Plugins/Appboy/models/InAppMessage/InAppMessageBase.cs diff --git a/Plugins/Appboy/models/InAppMessage/InAppMessageButton.cs b/Assets/Plugins/Appboy/models/InAppMessage/InAppMessageButton.cs similarity index 100% rename from Plugins/Appboy/models/InAppMessage/InAppMessageButton.cs rename to Assets/Plugins/Appboy/models/InAppMessage/InAppMessageButton.cs diff --git a/Plugins/Appboy/models/InAppMessage/InAppMessageConstants.cs b/Assets/Plugins/Appboy/models/InAppMessage/InAppMessageConstants.cs similarity index 100% rename from Plugins/Appboy/models/InAppMessage/InAppMessageConstants.cs rename to Assets/Plugins/Appboy/models/InAppMessage/InAppMessageConstants.cs diff --git a/Plugins/Appboy/models/InAppMessage/InAppMessageFactory.cs b/Assets/Plugins/Appboy/models/InAppMessage/InAppMessageFactory.cs similarity index 100% rename from Plugins/Appboy/models/InAppMessage/InAppMessageFactory.cs rename to Assets/Plugins/Appboy/models/InAppMessage/InAppMessageFactory.cs diff --git a/Plugins/Appboy/models/InAppMessage/InAppMessageFull.cs b/Assets/Plugins/Appboy/models/InAppMessage/InAppMessageFull.cs similarity index 100% rename from Plugins/Appboy/models/InAppMessage/InAppMessageFull.cs rename to Assets/Plugins/Appboy/models/InAppMessage/InAppMessageFull.cs diff --git a/Plugins/Appboy/models/InAppMessage/InAppMessageImmersiveBase.cs b/Assets/Plugins/Appboy/models/InAppMessage/InAppMessageImmersiveBase.cs similarity index 100% rename from Plugins/Appboy/models/InAppMessage/InAppMessageImmersiveBase.cs rename to Assets/Plugins/Appboy/models/InAppMessage/InAppMessageImmersiveBase.cs diff --git a/Plugins/Appboy/models/InAppMessage/InAppMessageModal.cs b/Assets/Plugins/Appboy/models/InAppMessage/InAppMessageModal.cs similarity index 100% rename from Plugins/Appboy/models/InAppMessage/InAppMessageModal.cs rename to Assets/Plugins/Appboy/models/InAppMessage/InAppMessageModal.cs diff --git a/Plugins/Appboy/models/InAppMessage/InAppMessageSlideup.cs b/Assets/Plugins/Appboy/models/InAppMessage/InAppMessageSlideup.cs similarity index 100% rename from Plugins/Appboy/models/InAppMessage/InAppMessageSlideup.cs rename to Assets/Plugins/Appboy/models/InAppMessage/InAppMessageSlideup.cs diff --git a/Plugins/Appboy/models/InAppMessage/InAppMessageType.cs b/Assets/Plugins/Appboy/models/InAppMessage/InAppMessageType.cs similarity index 100% rename from Plugins/Appboy/models/InAppMessage/InAppMessageType.cs rename to Assets/Plugins/Appboy/models/InAppMessage/InAppMessageType.cs diff --git a/Plugins/Appboy/models/PushNotification.cs b/Assets/Plugins/Appboy/models/PushNotification.cs similarity index 100% rename from Plugins/Appboy/models/PushNotification.cs rename to Assets/Plugins/Appboy/models/PushNotification.cs diff --git a/Plugins/Appboy/models/SlideFrom.cs b/Assets/Plugins/Appboy/models/SlideFrom.cs similarity index 100% rename from Plugins/Appboy/models/SlideFrom.cs rename to Assets/Plugins/Appboy/models/SlideFrom.cs diff --git a/Plugins/Metro/AppboyPlatform.PCL.dll b/Assets/Plugins/Metro/AppboyPlatform.PCL.dll similarity index 100% rename from Plugins/Metro/AppboyPlatform.PCL.dll rename to Assets/Plugins/Metro/AppboyPlatform.PCL.dll diff --git a/Plugins/Metro/AppboyPlatform.Universal.dll b/Assets/Plugins/Metro/AppboyPlatform.Universal.dll similarity index 100% rename from Plugins/Metro/AppboyPlatform.Universal.dll rename to Assets/Plugins/Metro/AppboyPlatform.Universal.dll diff --git a/Plugins/Metro/Lex.Db.dll b/Assets/Plugins/Metro/Lex.Db.dll similarity index 100% rename from Plugins/Metro/Lex.Db.dll rename to Assets/Plugins/Metro/Lex.Db.dll diff --git a/Plugins/Metro/Lex.Db.xml b/Assets/Plugins/Metro/Lex.Db.xml similarity index 100% rename from Plugins/Metro/Lex.Db.xml rename to Assets/Plugins/Metro/Lex.Db.xml diff --git a/Plugins/Metro/Newtonsoft.Json.dll b/Assets/Plugins/Metro/Newtonsoft.Json.dll similarity index 100% rename from Plugins/Metro/Newtonsoft.Json.dll rename to Assets/Plugins/Metro/Newtonsoft.Json.dll diff --git a/Plugins/Metro/Newtonsoft.Json.xml b/Assets/Plugins/Metro/Newtonsoft.Json.xml similarity index 100% rename from Plugins/Metro/Newtonsoft.Json.xml rename to Assets/Plugins/Metro/Newtonsoft.Json.xml diff --git a/Plugins/Metro/NodaTime.dll b/Assets/Plugins/Metro/NodaTime.dll similarity index 100% rename from Plugins/Metro/NodaTime.dll rename to Assets/Plugins/Metro/NodaTime.dll diff --git a/Plugins/Metro/NodaTime.xml b/Assets/Plugins/Metro/NodaTime.xml similarity index 100% rename from Plugins/Metro/NodaTime.xml rename to Assets/Plugins/Metro/NodaTime.xml diff --git a/Plugins/Metro/README.txt b/Assets/Plugins/Metro/README.txt similarity index 100% rename from Plugins/Metro/README.txt rename to Assets/Plugins/Metro/README.txt diff --git a/Plugins/Metro/System.Net.Http.Extensions.dll b/Assets/Plugins/Metro/System.Net.Http.Extensions.dll similarity index 100% rename from Plugins/Metro/System.Net.Http.Extensions.dll rename to Assets/Plugins/Metro/System.Net.Http.Extensions.dll diff --git a/Plugins/Metro/System.Net.Http.Extensions.xml b/Assets/Plugins/Metro/System.Net.Http.Extensions.xml similarity index 100% rename from Plugins/Metro/System.Net.Http.Extensions.xml rename to Assets/Plugins/Metro/System.Net.Http.Extensions.xml diff --git a/Plugins/Metro/System.Net.Http.Primitives.dll b/Assets/Plugins/Metro/System.Net.Http.Primitives.dll similarity index 100% rename from Plugins/Metro/System.Net.Http.Primitives.dll rename to Assets/Plugins/Metro/System.Net.Http.Primitives.dll diff --git a/Plugins/Metro/System.Net.Http.Primitives.xml b/Assets/Plugins/Metro/System.Net.Http.Primitives.xml similarity index 100% rename from Plugins/Metro/System.Net.Http.Primitives.xml rename to Assets/Plugins/Metro/System.Net.Http.Primitives.xml diff --git a/Plugins/Metro/WindowsUniversalUnityAdapter.dll b/Assets/Plugins/Metro/WindowsUniversalUnityAdapter.dll similarity index 100% rename from Plugins/Metro/WindowsUniversalUnityAdapter.dll rename to Assets/Plugins/Metro/WindowsUniversalUnityAdapter.dll diff --git a/Plugins/Metro/WindowsUniversalUnityAdapter.dll.config b/Assets/Plugins/Metro/WindowsUniversalUnityAdapter.dll.config similarity index 100% rename from Plugins/Metro/WindowsUniversalUnityAdapter.dll.config rename to Assets/Plugins/Metro/WindowsUniversalUnityAdapter.dll.config diff --git a/Plugins/Metro/WindowsUniversalUnityAdapter.pri b/Assets/Plugins/Metro/WindowsUniversalUnityAdapter.pri similarity index 100% rename from Plugins/Metro/WindowsUniversalUnityAdapter.pri rename to Assets/Plugins/Metro/WindowsUniversalUnityAdapter.pri diff --git a/Plugins/WindowsUniversalUnityAdapter.dll b/Assets/Plugins/WindowsUniversalUnityAdapter.dll similarity index 100% rename from Plugins/WindowsUniversalUnityAdapter.dll rename to Assets/Plugins/WindowsUniversalUnityAdapter.dll diff --git a/Assets/Plugins/iOS/AppboyAppDelegate.mm b/Assets/Plugins/iOS/AppboyAppDelegate.mm new file mode 100644 index 000000000..deb06c03f --- /dev/null +++ b/Assets/Plugins/iOS/AppboyAppDelegate.mm @@ -0,0 +1,53 @@ +#import +#import +#import "UnityAppController.h" +#import "AppboyKit.h" +#import "AppboyUnityManager.h" + +@interface AppboyAppDelegate : UnityAppController + +@end + +@implementation AppboyAppDelegate : UnityAppController + +# pragma mark - UIApplicationDelegate methods + +- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { + [super application:application didFinishLaunchingWithOptions:launchOptions]; + NSLog(@"AppboyAppDelegate called from application:didFinishLaunchingWithOptions:"); + + [[AppboyUnityManager sharedInstance] parsePlist]; + + // Initialize Appboy + [Appboy startWithApiKey:[[AppboyUnityManager sharedInstance] getApiKeyFromUnity] + inApplication:application + withLaunchOptions:launchOptions]; + + // Set listeners + [[AppboyUnityManager sharedInstance] setListeners]; + + // Register for push notifications + [[AppboyUnityManager sharedInstance] registerForRemoteNotifications]; + + return YES; +} + +- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; + NSLog(@"AppboyAppDelegate called from application:didRegisterForRemoteNotificationsWithDeviceToken with token %@", deviceToken); + // Register push token with Appboy + [[AppboyUnityManager sharedInstance] registerPushToken:deviceToken]; +} + +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))handler { + [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:handler]; + NSLog(@"AppboyAppDelegate called from application:didReceiveRemoteNotification. UIApplicationState is %ld", (long)[[UIApplication sharedApplication] applicationState]); + + // Pass notification to Appboy + [[AppboyUnityManager sharedInstance] registerApplication:application + didReceiveRemoteNotification:userInfo]; +} + +@end + +IMPL_APP_CONTROLLER_SUBCLASS(AppboyAppDelegate) diff --git a/Plugins/iOS/AppboyBinding.m b/Assets/Plugins/iOS/AppboyBinding.m similarity index 100% rename from Plugins/iOS/AppboyBinding.m rename to Assets/Plugins/iOS/AppboyBinding.m diff --git a/Plugins/iOS/AppboyUnityManager.h b/Assets/Plugins/iOS/AppboyUnityManager.h similarity index 77% rename from Plugins/iOS/AppboyUnityManager.h rename to Assets/Plugins/iOS/AppboyUnityManager.h index eaf5ab04b..35f133936 100644 --- a/Plugins/iOS/AppboyUnityManager.h +++ b/Assets/Plugins/iOS/AppboyUnityManager.h @@ -1,8 +1,23 @@ #import #import "AppboyKit.h" +static NSString *const ABKUnityApiKey = @"ApiKey"; +static NSString *const ABKUnityAutomaticPushIntegrationKey = @"IntegratesPush"; +static NSString *const ABKUnityDisableAutomaticPushRegistrationKey = @"DisableAutomaticPushRegistration"; +static NSString *const ABKUnitySetPushListenerKey = @"SetPushListener"; +static NSString *const ABKUnityPushReceivedGameObjectKey = @"PushReceivedGameObjectName"; +static NSString *const ABKUnityPushReceivedCallbackKey = @"PushReceivedCallbackMethodName"; +static NSString *const ABKUnityPushOpenedGameObjectKey = @"PushOpenedGameObjectName"; +static NSString *const ABKUnityPushOpenedCallbackKey = @"PushOpenedCallbackMethodName"; +static NSString *const ABKUnityInAppMessageGameObjectKey = @"InAppMessageGameObjectName"; +static NSString *const ABKUnityInAppMessageCallbackKey = @"InAppMessageCallbackMethodName"; +static NSString *const ABKUnityFeedGameObjectKey = @"FeedGameObjectName"; +static NSString *const ABKUnityFeedCallbackKey = @"FeedCallbackMethodName"; +static NSString *const ABKUnityHandleInAppMessageDisplayKey = @"DisplayInAppMessages"; + @interface AppboyUnityManager : NSObject +@property (nonatomic,copy) NSDictionary *appboyUnityPlist; @property (nonatomic, copy) NSString *unityFeedGameObjectName; @property (nonatomic, copy) NSString *unityFeedCallbackFunctionName; @property (nonatomic, copy) NSString *unityInAppMessageGameObjectName; @@ -46,10 +61,15 @@ - (void) setUserFacebookData:(NSString *)facebookId firstName:(NSString *)firstName lastName:(NSString *)lastName email:(NSString *)email bio:(NSString *)bio cityName:(NSString *)cityName gender:(NSInteger)gender numberOfFriends:(NSInteger)numberOfFriends birthday:(NSString *)birthday; - (void) setUserTwitterData:(NSInteger)twitterUserId twitterHandle:(NSString *)twitterHandle name:(NSString *)name description:(NSString *)description followerCount:(NSInteger)followerCount followingCount:(NSInteger)followingCount tweetCount:(NSInteger)tweetCount profileImageUrl:(NSString *)profileImageUrl; - (BOOL) submitFeedback:(NSString *)replyToEmail message:(NSString *)message isReportingABug:(BOOL)isReportingABug; +- (void) parsePlist; +- (NSString *) getApiKeyFromUnity; +- (void) setListeners; - (void) addInAppMessageListenerWithObjectName:(NSString *)gameObject callbackMethodName:(NSString *)callbackMethod; - (void) addFeedListenerWithObjectName:(NSString *)gameObject callbackMethodName:(NSString *)callbackMethod; - (void) addPushReceivedListenerWithObjectName:(NSString *)gameObject callbackMethodName:(NSString *)callbackMethod; - (void) addPushOpenedListenerWithObjectName:(NSString *)gameObject callbackMethodName:(NSString *)callbackMethod; +- (void) registerForRemoteNotifications; +- (void) registerPushToken:(NSData *)deviceToken; - (void) registerApplication:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification; - (void) logInAppMessageClicked:(NSString *)inAppMessageJSONString; - (void) logInAppMessageButtonClicked:(NSString *)inAppMessageJSONString withButtonID:(NSInteger)buttonID; diff --git a/Plugins/iOS/AppboyUnityManager.mm b/Assets/Plugins/iOS/AppboyUnityManager.mm similarity index 61% rename from Plugins/iOS/AppboyUnityManager.mm rename to Assets/Plugins/iOS/AppboyUnityManager.mm index d7303c18b..685d691f1 100644 --- a/Plugins/iOS/AppboyUnityManager.mm +++ b/Assets/Plugins/iOS/AppboyUnityManager.mm @@ -17,12 +17,12 @@ - (NSMutableDictionary *) proxyForJson; @implementation AppboyUnityManager + (AppboyUnityManager*)sharedInstance { - static AppboyUnityManager *sharedInstance = nil; + static AppboyUnityManager *sharedInstance = nil; - if(!sharedInstance) - sharedInstance = [[AppboyUnityManager alloc] init]; + if(!sharedInstance) + sharedInstance = [[AppboyUnityManager alloc] init]; - return sharedInstance; + return sharedInstance; } - (void) showFeedbackForm { @@ -43,11 +43,11 @@ - (void) changeUser:(NSString *)userId { [[Appboy sharedInstance] changeUser:userId]; } -- (void) logPurchase:(NSString *)productId inCurrency:(NSString *)currencyCode +- (void) logPurchase:(NSString *)productId inCurrency:(NSString *)currencyCode atPrice:(NSString *)price withQuantity:(NSUInteger)quantity withProperties:(NSDictionary *)properties { - [[Appboy sharedInstance] logPurchase:productId - inCurrency:currencyCode - atPrice:[NSDecimalNumber decimalNumberWithString:price] + [[Appboy sharedInstance] logPurchase:productId + inCurrency:currencyCode + atPrice:[NSDecimalNumber decimalNumberWithString:price] withQuantity:quantity andProperties:(NSDictionary *)properties]; } @@ -229,100 +229,184 @@ - (BOOL) onInAppMessageReceived:(ABKInAppMessage *)inAppMessage { UnitySendMessage([self.unityInAppMessageGameObjectName cStringUsingEncoding:NSUTF8StringEncoding], [self.unityInAppMessageCallbackFunctionName cStringUsingEncoding:NSUTF8StringEncoding], [dataString cStringUsingEncoding:NSUTF8StringEncoding]); + if ([self.appboyUnityPlist[ABKUnityHandleInAppMessageDisplayKey] boolValue]) { + return NO; + } return YES; } +- (ABKInAppMessageDisplayChoice)beforeInAppMessageDisplayed:(ABKInAppMessage *)inAppMessage withKeyboardIsUp:(BOOL)keyboardIsUp { + if (self.unityInAppMessageGameObjectName == nil) { + NSLog(@"Not sending a Unity message in response to an in-app message being received because " + "no message receiver was defined. To implement custom behavior in response to a in-app" + "message being received, you must register a GameObject and method name with Appboy " + "by calling [[AppboyUnityManager sharedInstance] addInAppMessageListenerWithObjectName: callbackMethodName:]."); + return ABKDisplayInAppMessageNow; + } + if (self.unityInAppMessageCallbackFunctionName == nil) { + NSLog(@"Not sending a Unity message in response to a in-app message being received because " + "no method name was defined for the %@. To implement custom behavior in response to a in-app " + "message being received, you must register a GameObject and method name with Appboy " + "[[AppboyUnityManager sharedInstance] addInAppMessageListenerWithObjectName: callbackMethodName:].", + self.unityInAppMessageGameObjectName); + return ABKDisplayInAppMessageNow; + } + NSLog(@"Sending an in-app message to %@:%@.", self.unityInAppMessageGameObjectName, self.unityInAppMessageCallbackFunctionName); + + NSData *inAppMessageData = [inAppMessage serializeToData]; + NSString *dataString = [[NSString alloc] initWithData:inAppMessageData encoding:NSUTF8StringEncoding]; + NSLog(@"dataString is %@.", dataString); + UnitySendMessage([self.unityInAppMessageGameObjectName cStringUsingEncoding:NSUTF8StringEncoding], + [self.unityInAppMessageCallbackFunctionName cStringUsingEncoding:NSUTF8StringEncoding], + [dataString cStringUsingEncoding:NSUTF8StringEncoding]); + if ([self.appboyUnityPlist[ABKUnityHandleInAppMessageDisplayKey] boolValue]) { + return ABKDisplayInAppMessageNow; + } + return ABKDiscardInAppMessage; +} + // Internal methods for communications between Appboy and Unity +- (void) parsePlist { + self.appboyUnityPlist = [[NSBundle mainBundle] infoDictionary][@"Appboy"][@"Unity"]; +} + +- (void) setListeners { + [self addPushReceivedListenerWithObjectName:self.appboyUnityPlist[ABKUnityPushReceivedGameObjectKey] callbackMethodName:self.appboyUnityPlist[ABKUnityPushReceivedCallbackKey]]; + [self addPushOpenedListenerWithObjectName:self.appboyUnityPlist[ABKUnityPushOpenedGameObjectKey] callbackMethodName:self.appboyUnityPlist[ABKUnityPushOpenedCallbackKey]]; + [self addInAppMessageListenerWithObjectName:self.appboyUnityPlist[ABKUnityInAppMessageGameObjectKey] callbackMethodName:self.appboyUnityPlist[ABKUnityInAppMessageCallbackKey]]; + [self addFeedListenerWithObjectName:self.appboyUnityPlist[ABKUnityFeedGameObjectKey] callbackMethodName:self.appboyUnityPlist[ABKUnityFeedCallbackKey]]; +} + +- (NSString *) getApiKeyFromUnity { + return self.appboyUnityPlist[ABKUnityApiKey]; +} + - (void) addInAppMessageListenerWithObjectName:(NSString *)gameObject callbackMethodName:(NSString *)callbackMethod { - self.unityInAppMessageGameObjectName = gameObject; - self.unityInAppMessageCallbackFunctionName = callbackMethod; + if (gameObject != nil && callbackMethod != nil) { + [Appboy sharedInstance].inAppMessageController.delegate = [AppboyUnityManager sharedInstance]; + self.unityInAppMessageGameObjectName = gameObject; + self.unityInAppMessageCallbackFunctionName = callbackMethod; + } } - (void) addFeedListenerWithObjectName:(NSString *)gameObject callbackMethodName:(NSString *)callbackMethod { - self.unityFeedGameObjectName = gameObject; - self.unityFeedCallbackFunctionName = callbackMethod; + if (gameObject != nil && callbackMethod != nil) { + self.unityFeedGameObjectName = gameObject; + self.unityFeedCallbackFunctionName = callbackMethod; + } } - (void) addPushReceivedListenerWithObjectName:(NSString *)gameObject callbackMethodName:(NSString *)callbackMethod { - self.unityPushReceivedGameObjectName = gameObject; - self.unityPushReceivedCallbackFunctionName = callbackMethod; + if (gameObject != nil && callbackMethod != nil) { + self.unityPushReceivedGameObjectName = gameObject; + self.unityPushReceivedCallbackFunctionName = callbackMethod; + } } - (void) addPushOpenedListenerWithObjectName:(NSString *)gameObject callbackMethodName:(NSString *)callbackMethod { - self.unityPushOpenedGameObjectName = gameObject; - self.unityPushOpenedCallbackFunctionName = callbackMethod; + if (gameObject != nil && callbackMethod != nil) { + self.unityPushOpenedGameObjectName = gameObject; + self.unityPushOpenedCallbackFunctionName = callbackMethod; + } } // Push related methods -- (void) registerApplication:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification { - [[Appboy sharedInstance] registerApplication:application didReceiveRemoteNotification:notification]; - - // generate a new dictionary that rearrange the notification elements - NSMutableDictionary *aps = [NSMutableDictionary dictionaryWithDictionary:[notification objectForKey:@"aps"]]; - - // check if the object for key alert is a string; if it is, then convert it to a dictionary - id alert = [aps objectForKey:@"alert"]; - if ([alert isKindOfClass:[NSString class]]) { - NSDictionary *alertDictionary = [NSDictionary dictionaryWithObject:alert forKey:@"body"]; - [aps setObject:alertDictionary forKey:@"alert"]; +- (void) registerForRemoteNotifications { + if ([self.appboyUnityPlist[ABKUnityAutomaticPushIntegrationKey] boolValue] + && self.appboyUnityPlist[ABKUnityDisableAutomaticPushRegistrationKey] + && ![self.appboyUnityPlist[ABKUnityDisableAutomaticPushRegistrationKey] boolValue]) { + if (floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_7_1) { + NSLog(@"Calling UIApplication registerForRemoteNotificationTypes"); + [[UIApplication sharedApplication] registerForRemoteNotificationTypes: + (UIRemoteNotificationTypeAlert | + UIRemoteNotificationTypeBadge | + UIRemoteNotificationTypeSound)]; + } else { + NSLog(@"Calling UIApplication registerForRemoteNotifications"); + UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeBadge|UIUserNotificationTypeAlert | UIUserNotificationTypeSound) categories:nil]; + [[UIApplication sharedApplication] registerForRemoteNotifications]; + [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; + } } - - // move all other dictionarys other than aps in payload to key extra in aps dictionary - NSMutableDictionary *extraDictionary = [NSMutableDictionary dictionaryWithDictionary:notification]; - [extraDictionary removeObjectForKey:@"aps"]; - if ([extraDictionary count] > 0) { - [aps setObject:extraDictionary forKey:@"extra"]; +} + +- (void) registerPushToken:(NSData *)deviceToken { + if ([self.appboyUnityPlist[ABKUnityAutomaticPushIntegrationKey] boolValue]) { + [[Appboy sharedInstance] registerPushToken:[NSString stringWithFormat:@"%@", deviceToken]]; } - - if ([NSJSONSerialization isValidJSONObject:aps]) { - NSError *pushParsingError = nil; - NSData *data = [NSJSONSerialization dataWithJSONObject:aps options:0 error:&pushParsingError]; +} + +- (void) registerApplication:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)notification { + if (self.appboyUnityPlist == nil || [self.appboyUnityPlist[ABKUnityAutomaticPushIntegrationKey] boolValue]) { + [[Appboy sharedInstance] registerApplication:application didReceiveRemoteNotification:notification]; + + // generate a new dictionary that rearrange the notification elements + NSMutableDictionary *aps = [NSMutableDictionary dictionaryWithDictionary:[notification objectForKey:@"aps"]]; + + // check if the object for key alert is a string; if it is, then convert it to a dictionary + id alert = [aps objectForKey:@"alert"]; + if ([alert isKindOfClass:[NSString class]]) { + NSDictionary *alertDictionary = [NSDictionary dictionaryWithObject:alert forKey:@"body"]; + [aps setObject:alertDictionary forKey:@"alert"]; + } + + // move all other dictionarys other than aps in payload to key extra in aps dictionary + NSMutableDictionary *extraDictionary = [NSMutableDictionary dictionaryWithDictionary:notification]; + [extraDictionary removeObjectForKey:@"aps"]; + if ([extraDictionary count] > 0) { + [aps setObject:extraDictionary forKey:@"extra"]; + } - if (pushParsingError == nil) { - NSString *dataString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + if ([NSJSONSerialization isValidJSONObject:aps]) { + NSError *pushParsingError = nil; + NSData *data = [NSJSONSerialization dataWithJSONObject:aps options:0 error:&pushParsingError]; - if (application.applicationState == UIApplicationStateActive) { - if (self.unityPushReceivedGameObjectName == nil) { - NSLog(@"Not sending a Unity message in response to a push notification being received because " - "no message receiver was defined. To implement custom behavior in response to a push " - "notification being received, you must register a GameObject and method name with Appboy " - "by calling [AppboyUnityManager sharedInstance] addPushReceivedListenerWithObjectName: callbackMethodName]."); - return; - } - if (self.unityPushReceivedCallbackFunctionName == nil) { - NSLog(@"Not sending a Unity message in response to a push notification being received because " - "no method name was defined for the %@. To implement custom behavior in response to a push " - "notification being received, you must register a GameObject and method name with Appboy " - "by calling [AppboyUnityManager sharedInstance] addPushReceivedListenerWithObjectName: callbackMethodName].", - self.unityPushReceivedGameObjectName); - return; - } - NSLog(@"Sending a notification received message to %@:%@.", self.unityPushReceivedGameObjectName, self.unityPushReceivedCallbackFunctionName); + if (pushParsingError == nil) { + NSString *dataString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; - UnitySendMessage([self.unityPushReceivedGameObjectName cStringUsingEncoding:NSUTF8StringEncoding], - [self.unityPushReceivedCallbackFunctionName cStringUsingEncoding:NSUTF8StringEncoding], - [dataString cStringUsingEncoding:NSUTF8StringEncoding]); - } else { - if (self.unityPushOpenedGameObjectName == nil) { - NSLog(@"Not sending a Unity message in response to a push notification being opened because " - "no message receiver was defined. To implement custom behavior in response to a push " - "notification being opened, you must register a GameObject and method name with Appboy " - "by calling [AppboyUnityManager sharedInstance] addPushOpenedListenerWithObjectName: callbackMethodName]."); - return; - } - if (self.unityPushOpenedCallbackFunctionName == nil) { - NSLog(@"Not sending a Unity message in response to a push notification being opened because " - "no method name was defined for the %@. To implement custom behavior in response to a push " - "notification being opened, you must register a GameObject and method name with Appboy " - "[AppboyUnityManager sharedInstance] addPushOpenedListenerWithObjectName: callbackMethodName].", - self.unityPushOpenedGameObjectName); - return; + if (application.applicationState == UIApplicationStateActive) { + if (self.unityPushReceivedGameObjectName == nil) { + NSLog(@"Not sending a Unity message in response to a push notification being received because " + "no message receiver was defined. To implement custom behavior in response to a push " + "notification being received, you must register a GameObject and method name with Appboy " + "by calling [AppboyUnityManager sharedInstance] addPushReceivedListenerWithObjectName: callbackMethodName]."); + return; + } + if (self.unityPushReceivedCallbackFunctionName == nil) { + NSLog(@"Not sending a Unity message in response to a push notification being received because " + "no method name was defined for the %@. To implement custom behavior in response to a push " + "notification being received, you must register a GameObject and method name with Appboy " + "by calling [AppboyUnityManager sharedInstance] addPushReceivedListenerWithObjectName: callbackMethodName].", + self.unityPushReceivedGameObjectName); + return; + } + NSLog(@"Sending a notification received message to %@:%@.", self.unityPushReceivedGameObjectName, self.unityPushReceivedCallbackFunctionName); + + UnitySendMessage([self.unityPushReceivedGameObjectName cStringUsingEncoding:NSUTF8StringEncoding], + [self.unityPushReceivedCallbackFunctionName cStringUsingEncoding:NSUTF8StringEncoding], + [dataString cStringUsingEncoding:NSUTF8StringEncoding]); + } else { + if (self.unityPushOpenedGameObjectName == nil) { + NSLog(@"Not sending a Unity message in response to a push notification being opened because " + "no message receiver was defined. To implement custom behavior in response to a push " + "notification being opened, you must register a GameObject and method name with Appboy " + "by calling [AppboyUnityManager sharedInstance] addPushOpenedListenerWithObjectName: callbackMethodName]."); + return; + } + if (self.unityPushOpenedCallbackFunctionName == nil) { + NSLog(@"Not sending a Unity message in response to a push notification being opened because " + "no method name was defined for the %@. To implement custom behavior in response to a push " + "notification being opened, you must register a GameObject and method name with Appboy " + "[AppboyUnityManager sharedInstance] addPushOpenedListenerWithObjectName: callbackMethodName].", + self.unityPushOpenedGameObjectName); + return; + } + NSLog(@"Sending a notification opened message to %@:%@.", self.unityPushOpenedGameObjectName, self.unityPushOpenedCallbackFunctionName); + + UnitySendMessage([self.unityPushOpenedGameObjectName cStringUsingEncoding:NSUTF8StringEncoding], + [self.unityPushOpenedCallbackFunctionName cStringUsingEncoding:NSUTF8StringEncoding], + [dataString cStringUsingEncoding:NSUTF8StringEncoding]); } - NSLog(@"Sending a notification opened message to %@:%@.", self.unityPushOpenedGameObjectName, self.unityPushOpenedCallbackFunctionName); - - UnitySendMessage([self.unityPushOpenedGameObjectName cStringUsingEncoding:NSUTF8StringEncoding], - [self.unityPushOpenedCallbackFunctionName cStringUsingEncoding:NSUTF8StringEncoding], - [dataString cStringUsingEncoding:NSUTF8StringEncoding]); } } } @@ -402,7 +486,7 @@ - (void) requestFeedFromCache:(NSNotification *)notification { NSMutableArray *cardsDictionaryArray = [NSMutableArray arrayWithCapacity:1]; NSArray *cards = [[Appboy sharedInstance].feedController getCardsInCategories:ABKCardCategoryAll]; for (ABKCard *card in cards) { - + NSMutableDictionary *cardDictionary = [card proxyForJson]; [cardsDictionaryArray addObject:cardDictionary]; } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ce6ce5a3..b99d6a667 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## 1.8.0 +* Updates the iOS plugin to use Appboy iOS SDK 2.21.0, which drops support for iOS 6. +* Updates the Android plugin to use Appboy Android SDK 1.13.5. +* Drops support for Windows Phone 8. +* Adds support for passing triggered in-app messages to Unity. +* Bundles the Android and iOS plugins, along with Appboy’s native Unity functionality, as a Unity package. +* Adds a native Unity solution for automating the iOS SDK integration. +* Adds object handling for custom event and purchase properties. +* Exposes the extras on the News Feed Card model in Unity. +* Updates the Unity sample project to Unity v.5.3.5. + ## 1.7.0 * Updates the Android plugin to use Appboy Android SDK 1.13.2. * Updates the iOS plugin to use Appboy iOS SDK 2.19.1. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index c8fbdb1b6..000000000 --- a/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (c) 2016 Appboy, Inc. -All rights reserved. - -* Use of source code or binaries contained within Appboy's Unity SDK is permitted only to enable use of the Appboy platform by customers of Appboy. -* Modification of source code and inclusion in mobile apps is explicitly allowed provided that all other conditions are met. -* Neither the name of Appboy nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -* Redistribution of source code or binaries is disallowed except with specific prior written permission. Any such redistribution must retain the above copyright notice, this list of conditions and the following disclaimer. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Plugins/Android/libs/appboy-ui.aar b/Plugins/Android/libs/appboy-ui.aar deleted file mode 100644 index 9fee14d0f..000000000 Binary files a/Plugins/Android/libs/appboy-ui.aar and /dev/null differ diff --git a/Plugins/Android/libs/appboy-unity.aar b/Plugins/Android/libs/appboy-unity.aar deleted file mode 100644 index 48da52d2d..000000000 Binary files a/Plugins/Android/libs/appboy-unity.aar and /dev/null differ diff --git a/Plugins/Android/libs/appboy.jar b/Plugins/Android/libs/appboy.jar deleted file mode 100644 index 7e0db1420..000000000 Binary files a/Plugins/Android/libs/appboy.jar and /dev/null differ diff --git a/Plugins/WP8/AppboyPlatform.PCL.dll b/Plugins/WP8/AppboyPlatform.PCL.dll deleted file mode 100755 index ac6c79580..000000000 Binary files a/Plugins/WP8/AppboyPlatform.PCL.dll and /dev/null differ diff --git a/Plugins/WP8/AppboyPlatform.Phone.dll b/Plugins/WP8/AppboyPlatform.Phone.dll deleted file mode 100755 index c7fdd223a..000000000 Binary files a/Plugins/WP8/AppboyPlatform.Phone.dll and /dev/null differ diff --git a/Plugins/WP8/Lex.Db.dll b/Plugins/WP8/Lex.Db.dll deleted file mode 100755 index 2b0d5fdea..000000000 Binary files a/Plugins/WP8/Lex.Db.dll and /dev/null differ diff --git a/Plugins/WP8/Lex.Db.xml b/Plugins/WP8/Lex.Db.xml deleted file mode 100755 index 9b795c2c8..000000000 --- a/Plugins/WP8/Lex.Db.xml +++ /dev/null @@ -1,1633 +0,0 @@ - - - - Lex.Db - - - - - Extreme fast generic constructor. - - - About 20 times faster than "new T()", because the last one uses slow reflection-based Activator.CreateInstance internally. - - Type to construct - - - - Generic constructor function - - - - - Extreme fast generic constructor. Constructs , but returns . So must be direct assignable to . - - - About 20 times faster than "new T()", because the last one uses slow reflection-based Activator.CreateInstance internally. - - Type to construct - Type to return - - - - Generic constructor function, returning as type - - - - - Database access and management - - - - - Creates database instance with specified path - - Path to database storage folder (relative to home folder, default app storage in case home is null) - Home folder (string or StorageFolder instance) (optional) - - - - Initializes database - - - - - Indicates path to database storage folder (relative to default app storage) - - - - - Gets database instance storage statistics - - Database instance storage statistics - - - - Indicates whether specified entity type is mapped in database - - Entity type - True if type is mapped in database, false otherwise - - - - Indicates whether specified entity type is mapped in database - - Entity type - True if type is mapped in database, false otherwise - - - - Maps specified entity type in database and provides mapping infrastructure - - Entity type - Entity T mapping configurator - - - - Maps specified entity type in database and provides mapping infrastructure - - Entity prototype - Entity implementation constructor - Entity T mapping configurator - - - - Maps specified entity type in database and provides mapping infrastructure - - Entity prototype - Entity implementation type - Entity T mapping configurator - - - - Provides database table infrastructure to read/write/query entities - - - - - - - Provides list of known tables - - - - - global db read/write lock - - - - - Performs specified action inside read transaction scope - - Action to execute inside read transaction scope - - - - Performs specified action inside write transcantion scope. - - Action to execute inside write transaction scope - - - - Loads all entities of specified entity type - - Type of the entity - Array of all entities - - - - Loads an entity of specified entity type by specified PK value - - Type of the entity - Type of the PK - PK value - Entity identified by the PK value, if any - - - - Loads an entity of specified entity type by specified PK value - - Type of the entity - Type of the PK - PK value - Entity identified by the PK value, if any - - - - Bulk load specified instances by key - - Type of the entity - Type of the PK - Sequence of keys to load - Specifies that missed keys will be returned as nulls - List of corresponding instances - - - - Bulk load specified instances by key - - Type of the entity - Sequence of keys to load - Specifies that missed keys will be returned as nulls - List of corresponding instances - - - - Determines number of entities stored in specified entity table - - Type of the entity - Number of entities stored in specified entity table - - - - Saves specified entity, adding or updating as needed - - Type of the entity - Entity to upsert into table - - - - Saves specified entity sequence, adding or updating as needed - - Type of the entity - Entity sequence to upsert into table - - - - Saves specified entity sequence, adding or updating as needed - - Type of the entity - Entity sequence to upsert into table - - - - Deletes entities specified by key sequence - - Type of the entity - Type of the primary key - Sequence of key values to specify entities to delete - Returns count of the deleted entities - - - - Deletes entities specified by key sequence - - Type of the entity - Sequence of key values to specify entities to delete - Returns count of the deleted entities - - - - Deletes entity specified by PK value - - Type of the entity - Type of the PK - Key of entity to delete - True if entity was deleted - - - - Deletes entity specified by PK value - - Type of the entity - Key of entity to delete - True if entity was deleted - - - - Deletes specified entity - - Type of the entity - Entity to delete - True if entity was deleted - - - - Refreshes specified entity from disk - - Type of the entity - Entity to refresh - Same entity, updated from disk - - - - Lists all current key values for specified entity type - - Type of the entity - Type of the PK - Array of all current key values for specified entity type - - - - Lists all current key values - - Type of the entity - Array of all current key values for specified entity type - - - - Flushes underlying database storage - - - - - Flushes the underlying table storage - - Type of the entity - - - - Compacts all data files in database - - - - - Clears the database - - - - - Clears the specified entity table - - Type of the entity - - - - Disposes database - - - - - Abstract database table interface - - - - - Type of the table entity class - - - - - Name of the table - - - - - Determines count of entities stored in the table - - - - - - Removes all entities from the table - - - - - Compacts the data stream of the table - - - - - Flushed the underlying data and index streams to disk - - - - - Specifies key/values pairs of the table metadata - - Metadata property name - Value of the named metadata property - - - - Gathers all currently used PK values from PK index - - Type of the key - Typed list of key values - - - - Gathers all currently used PK values from PK index - - Untyped IEnumerable of key values - - - - Determines minimal PK value from PK index, - returns default(K) if table is empty - - Type of the key - Minimal PK value - - - - Determines maximal PK value from PK index, - returns default(K) if table is empty - - Type of the key - Maximal PK value - - - - Deletes single entity by PK value - - Type of the key - Entity PK value - Returns true if record was deleted, false otherwise - - - - Deletes single entity by PK value - - Entity PK value - Returns true if record was deleted, false otherwise - - - - Deletes set of entities, determined by their PK values - - Type of the key - Enumeration of entity PK values - Returns number of deleted by key entities - - - - Deletes set of entities, determined by their PK values - - Enumeration of entity PK values - Returns number of deleted by key entities - - - - Returns table size information - - DbTableInfo instance filled with size info - - - - Typed database table - - Table entity class - - - - Type of the table entity class - - - - - Name of the table - - - - - Gets primary index query constructor - - Type of the primary key - Primary index query constructor - - - - Returns new named index query constructor - - Type of the indexed component - Name of the index - New index query constructor - - - - Returns new named index query constructor, set to look for supplied key - - Type of the indexed component - Name of the index - Key value to filter using index - New index query constructor, set to look for specified key - - - - Returns new named index query constructor - - Type of the first indexed component - Type of the second indexed component - Name of the index - New named index query constructor - - - - Returns named index query constructor, set to look for supplied key components - - Type of the first indexed component - Type of the second indexed component - Name of the index - First part of the key to filter using index - Second part of the key to filter using index - New named index query constructor, set to look for supplied key components - - - - Returns new named index query constructor - - Type of the first indexed component - Type of the second indexed component - Type of the third indexed component - Name of the index - New named index query constructor - - - - Returns named index query constructor, set to look for supplied key components - - Type of the first indexed component - Type of the second indexed component - Type of the third indexed component - Name of the index - First part of the key to filter using index - Second part of the key to filter using index - Third part of the key to filter using index - New named index query constructor, set to look for supplied key components - - - - Determines number of entities stored in the table - - Number of entities stored in the table - - - - Lists all current key values - - Type of the PK - List of all current key values - - - - Lists all current keys - - Sequence of key values - - - - Loads all entities - - Array of all entities - - - - Loads an entity by specified PK value - - Type of the primary key - PK value - Entity identified by the PK value, if any - - - - Bulk load specified instances by key - - Type of the primary key - Sequence of keys to load - Specifies that missed keys will be returned as nulls - List of corresponding instances - - - - Bulk load specified instances by key - - Type of the primary key - Sequence of keys to load - Specifies that missed keys will be returned as nulls - List of corresponding instances - - - - Refreshes specified entity from disk - - Entity to refresh - Same entity, updated from disk - - - - Saves specified entity sequence, adding or updating as needed - - Entity sequence to upsert into table - - - - Saves specified entity, adding or updating as needed - - Entity to upsert into table - - - - Fast check index header and reloads it when changed - - - - - Flushes the underlying table storage - - - - - Returns size information about the table - - DbTableInfo instance filled with size info - - - - Deletes entity specified by key - - Type of the primary key - Key of entity to delete - True if entity was deleted - - - - Deletes entities specified by key sequence - - Key sequence to delete - Count of the deleted entities - - - - Deletes entities specified by key sequence - - Type of the primary key - Key sequence to delete - Count of the deleted entities - - - - Deletes specified entity - - Entity to delete - True is entity was deleted - - - - Deletes entities specified by the sequence - - Sequence of entities to delete - - - - Compacts data file of the table - - - - - Clears the table - - - - - Specifies key/values pairs of the table metadata - - Metadata property name - Value of the named metadata property - - - - Determines minimal PK value from PK index, - returns default(K) if table is empty - - Type of the key - Minimal PK value - - - - Determines maximal PK value from PK index, - returns default(K) if table is empty - - Type of the key - Maximal PK value - - - - Retrieves an object that can iterate through the individual entities in this table. - - An enumerator object. - - - - Asynchronous extensions for DbTable - - - - - Asynchronously loads all entities from table - - Type of the entity class - Table of the entity class - Awaitable Task with array of entities in result - - - - Asynchronously counts all entities from table - - Type of the entity class - Table of the entity class - Awaitable Task with count in result - - - - Asynchronously loads all PK values from PK index - - Type of the PK - Table of the entity class - Awaitable Task with list of PK values in result - - - - Asynchronously loads all PK values from PK index - - Table of the entity class - Awaitable Task with enumeration of untyped PK values in result - - - - Asynchronously loads entity by PK value - - Type of the entity class - Type of the PK - Table of the entity class - The PK value of entity to load - Awaitable Task with loaded entity in result, or null if not found - - - - Asynchronously loads entities with speicified PK values - - Type of the entity class - Type of the PK - Table of the entity class - The enumeration of PK values to load - Specifies that missing records should be ignored or returnes as nulls - Awaitable Task with enumeration of loaded entities in result - - - - Asynchronously materializes indexed query result - - Type of the entity class - Type of the index - Indexed query to execute - Awaitable Task with enumeration of loaded entities in result - - - - Asynchronously materializes indexed query lazy result - - Type of the entity class - Type of the index - Indexed query to execute - Awaitable Task with enumeration of loaded entities in result - - - - Asynchronously materializes indexed query result - - Type of the entity class - Type of the index - Indexed query to count result - Awaitable Task with number of entities in result - - - - Asynchronously materializes indexed query result - - Type of the entity class - Type of the first component index - Type of the second component index - Indexed query to execute - Awaitable Task with enumeration of loaded entities in result - - - - Asynchronously materializes indexed query lazy result - - Type of the entity class - Type of the first component index - Type of the second component index - Indexed query to execute - Awaitable Task with enumeration of loaded entities in result - - - - Asynchronously materializes indexed query result - - Type of the entity class - Type of the first component index - Type of the second component index - Indexed query to count result - Awaitable Task with number of entities in result - - - - Asynchronously materializes indexed query result - - Type of the entity class - Type of the first component index - Type of the second component index - Type of the third component index - Indexed query to execute - Awaitable Task with enumeration of loaded entities in result - - - - Asynchronously materializes indexed query lazy result - - Type of the entity class - Type of the first component index - Type of the second component index - Type of the third component index - Indexed query to execute - Awaitable Task with enumeration of loaded entities in result - - - - Asynchronously materializes indexed query result - - Type of the entity class - Type of the first component index - Type of the second component index - Type of the third component index - Indexed query to count result - Awaitable Task with number of entities in result - - - - Asynchronously reloads specified entity by its PK - - Type of the entity class - Table of the entity class - Entity to reload from table - Awaitable Task with reloaded entity in result - - - - Asynchronously saves specified entities - - Type of the entity class - Table of the entity class - Enumeration of entities to save - Awaitable Task of the save operation - - - - Asynchronously saves specified entity - - Type of the entity class - Table of the entity class - Entity to save - Awaitable Task of the save operation - - - - Asynchronously deletes specified entity by PK supplied - - Type of the PK - Table of the entity class - The PK value - Awaitable Task with success flag in result - - - - Asynchronously deletes specified entities by their PKs - - Type of the PK - Table of the entity class - The enumeration of PK values - Awaitable Task with count of successfully deleted entities in result - - - - Asynchronously deletes specified entity - - Type of the entity class - Table of the entity class - Entity to delete - Awaitable Task with success flag in result - - - - Asynchronously deletes specified entities - - Type of the entity class - Table of the entity class - Entities to delete - Awaitable Task with count of successfully deleted entities in result - - - - Asynchronously initializes database instance - - Database instance to initialize - Awaitable Task of initialize operation - - - - Asynchronously executes read actions inside read transaction - - Database instance to read from - Read operations to perform - Awaitable Task of read operations - - - - Asynchronously executes write actions inside write transaction - - Database instance to write to - Write operations to perform - Awaitable Task of write operations - - - - Asynchronously purges specified table - - Table to purge - Awaitable Task of purge operation - - - - Asynchronously purges specified database instance - - Database instance to purge - Awaitable Task of purge operation - - - - Asynchronously compacts specified table - - Table to compact - Awaitable Task of compact operation - - - - Asynchronously compacts specified database instance - - Database instance to compact - Awaitable Task of compact operation - - - - Asynchronously determines table sizes - - Table to inspect - Awaitable Task of inspect operation - - - - Asynchronously determines database sizes - - Database instance to inspect - Awaitable Task of inspect operation - - - - A reader-writer lock implementation that is intended to be simple, yet very - efficient. In particular only 1 interlocked operation is taken for any lock - operation (we use spin locks to achieve this). The spin lock is never held - for more than a few instructions (in particular, we never call event APIs - or in fact any non-trivial API while holding the spin lock). - - - - - This routine retrieves/sets the per-thread counts needed to enforce the - various rules related to acquiring the lock. It's a simple hash table, - where the first entry is pre-allocated for optimizing the common case. - After the first element has been allocated, duplicates are kept of in - linked-list. The entries are never freed, and the max size of the - table would be bounded by the max number of threads that held the lock - simultaneously. - - DontAllocate is set to true if the caller just wants to get an existing - entry for this thread, but doesn't want to add one if an existing one - could not be found. - - - - - A routine for lazily creating a event outside the lock (so if errors - happen they are outside the lock and that we don't do much work - while holding a spin lock). If all goes well, reenter the lock and - set 'waitEvent' - - - - - Waits on 'waitEvent' with a timeout of 'millisceondsTimeout. - Before the wait 'numWaiters' is incremented and is restored before leaving this routine. - - - - - Determines the appropriate events to set, leaves the locks, and sets the events. - - - - - Initial index format had dedicated nodes for duplicate keys, so we have to do one-way upgrade - - - - - Data block location info - - Provisioned instance to load - - - - Colour of the node - - - - - Red - - - - - Black - - - - - Remove all items - - - - - Add new key into the tree - - This operation is O(logN) operation - - In case the key is already in the tree - - - - Add new key into the tree or get existing node - This operation is O(logN) operation - - - - - Remove key from the dictionary - This operation is O(logN) operation - - - - - Remove node from the dictionary - This operation is O(1) operation - - - - - Delete the node z, and free up the space - - - - - Restore the reb-black properties after a delete - - - - - - Find key in the dictionary - This operation is O(logN) operation - - - - - Go trough tree and find the node by the key. - Might add new node if node doesn't exist. - - - - - Balance tree past inserting - - - - - Return a pointer to the smallest key greater than x - - - - - Return a pointer to the largest key smaller than x - - - - - Get first node - This operation is O(logN) operation - - - - - Get first node - This operation is O(logN) operation - - - - - Get last node - This operation is O(logN) operation - - - - - Query via index interface - - - - - Counts the number of the indexed entities identitified by the query - - Number of entities identitified by the query - - - - Returns the list of PK values for entities identitified by the query - - Type of the primary key - List of PK values for entities identitified by the query - - - - Typed query via index interface - - Entity type - - - - Loads entities returned by the query - - List of entities identitified by the query - - - - Typed query via index interface - - Entity type - Type of the indexed member - - - - Lazy loads entities returned by the query - - List of lazy-loaded entities identitified by the query - - - - Returns a specified number of contiguous entities from the start of a query. - - The number of elements to return. - A new query that returns the specified number of entities. - - - - Bypasses a specified number of entities in a query and then returns the remaining entities. - - The number of entities to skip before returning the remaining entities. - A new query that bypasses the specified number of entities. - - - - Returns entities with specified lower bound - - - - - Returns entities with specified upper bound - - - - - Returns entities with specified key value - - Key value - A new query that returns entities with specified key value. - - - - Returns entities with filtered key values - - Predicate function to filter entities - A new query that returns entities with filtered key values. - - - - Typed query via 2-component index interface - - Entity type - Type of the first component indexed member - Type of the second component indexed member - - - - Lazy loads entities returned by the query - - List of lazy-loaded entities identitified by the query - - - - Returns a specified number of contiguous entities from the start of a query. - - The number of elements to return. - A new query that returns the specified number of entities. - - - - Bypasses a specified number of entities in a query and then returns the remaining entities. - - The number of entities to skip before returning the remaining entities. - A new query that bypasses the specified number of entities. - - - - Returns entities with specified 2-component lower bound - - - - - Returns entities with specified 2-component upper bound - - - - - Returns entities with specified 2-component key value - - First component key value - Second component key value - A new query that returns entities with specified key value. - - - - Returns entities with filtered key values - - Predicate function to filter entities - A new query that returns entities with filtered key values. - - - - Typed query via 3-component index interface - - Entity type - Type of the first component indexed member - Type of the second component indexed member - Type of the third component indexed member - - - - Lazy loads entities returned by the query - - List of lazy-loaded entities identitified by the query - - - - Returns a specified number of contiguous entities from the start of a query. - - The number of elements to return. - A new query that returns the specified number of entities. - - - - Bypasses a specified number of entities in a query and then returns the remaining entities. - - The number of entities to skip before returning the remaining entities. - A new query that bypasses the specified number of entities. - - - - Returns entities with specified 3-component lower bound - - - - - Returns entities with specified 3-component upper bound - - - - - Returns entities with specified 3-component key value - - First component key value - Second component key value - Third component key value - A new query that returns entities with specified key value. - - - - Returns entities with filtered key values - - Predicate function to filter entities - A new query that returns entities with filtered key values. - - - - Provides support for lazy initialization - - Specifies the type of entity that is being lazily loaded - - - - Primary key used to lazy load the entity - - - - - Gets the lazily loaded entity of the current Lazy instance. - - - - - Provides support for lazy entity loading as well as access to index value consisting from one component - - Specifies the type of entity that is being lazily loaded - Type of the index component - - - - Index component - - - - - Provides support for lazy entity loading as well as access to index value consisting from two components - - Specifies the type of entity that is being lazily loaded - Type of the first index component - Type of the second index component - - - - First index component - - - - - Second index component - - - - - Provides support for lazy entity loading as well as access to index value consisting from three components - - Specifies the type of entity that is being lazily loaded - Type of the first index component - Type of the second index component - Type of the third index component - - - - First index component - - - - - Second index component - - - - - Third index component - - - - - foreach(var property in properties) - if (Interceptor.NeedSerialize(T, property.Name) - { - WritePropertyId(); - WritePropertyValue(); - } - WritePropertyId(-1); - - - - - Original DB Format, data indexes are non-unique, upgrade needed - - - - - Entity type to table mapping base - - - - - Indicates name of the table - - - - - Entity type to table mapping - - - - - - Indicates name of the table - - - - - Defines a non-default name of the entity table - - Name of the table file without extension - Entity type mapping to continue with - - - - Resets all mappings - - Entity type mapping to continue with - - - - Registers interceptor to control serialization of properties - - Custom interceptor implementation - Entity type mapping to continue with - - - - Registers interceptor function to control serialization of properties - - Custom interceptor function - Entity type mapping to continue with - - - - Defines primary key expression, indicating optional automatic generation of PK values - - Type of the PK - Primary key expression - Indicates automatic generation of PK values (int, long, Guid types only) - Optional primary key comparer - Entity type mapping to continue with - - - - Defines complete mapping for public properties and fields via reflection, - with specified primary key expression and optional automatic generation - - Type of the PK - Primary key expression - Indicates automatic generation of PK values (int, long, Guid types only) - Optional primary key comparer - Entity type mapping to continue with - - - - Defines complete mapping for public properties and fields via reflection - - Entity type mapping to continue with - - - - Removes mapping for specified member - - Type of the member - Member access expression - Entity type mapping to continue with - - - - Adds mapping for specified member - - Type of the member - Members access expression (public readable/writable property or field) - Entity type mapping to continue with - - - - Adds non-unique typed index over single component - - Type of the index key - Name of the index - Indexing expression - Optional comparer for indexing expression - Entity type mapping to continue with - - - - Adds non-unique typed index over two components - - Type of the first index key component - Type of the second index key component - Name of the index - First index key component expression - Second index key component expression - Optional comparer for first index key component - Optional comparer for second index key component - Entity type mapping to continue with - - - - Adds non-unique typed index over three components - - Type of the first index key component - Type of the second index key component - Type of the third index key component - Name of the index - First index key component expression - Second index key component expression - Third index key component expression - Optional comparer for first index key component - Optional comparer for second index key component - Optional comparer for thirt index key component - Entity type mapping to continue with - - - - Incapsulates logic to decide which members should be serialized - - Entity type - - - - Implements deciding logic whether member should be stored in table or not - - Entity instance to inspect - Name of the member to serialize - True is member should be serialized, false otherwise - - - - Serialization extender - - - - - Registers static serialization extension before any DbInstance initialization. - Serialization extensions is a static class with following methods pattern: - public static K ReadXXX(DataReader reader) - public static void WriteXXX(DataWriter writer, K value) - where K is custom type to serialize - XXX is type name of K without namespace - - Type to serialize - Serialization extension - Stable (for the lifetime of your app) id of the custom type. - Must be greater than 1000 (other are already taken or reserved for future use) - - - - Provides serialization logic and code generation - - - - - Extended binary reader - - - - - Creates DataReader with specified owned stream - - Stream to read from - - - - Reads TimeSpan value from stream - - TimeSpan value - - - - Reads DateTime value from stream - - DateTime value - - - - Reads DateTimeOffset value from stream - - DateTimeOffset value - - - - Reads Guid value from stream - - Guid value - - - - Reads byte array from stream - - Byte array - - - - Extended binary writer - - - - - Creates DataWriter with specified owned stream - - Stream to write to - - - - Writes TimeSpan value to stream - - TimeSpan value to write - - - - Writes DateTime value to stream - - DateTime value to write - - - - Writes DateTimeOffset value to stream - - DateTimeOffset value to write - - - - Writes Guid value to stream - - Guid value to write - - - - Writes byte array to stream - - Byte array to write - - - - Table size information container - - - - - Actual size of the index file - - - - - Actual size of the data file (including gaps) - - - - - Effective size of the data file (excluding gaps) - - - - - Summs all numeric properties - - - - diff --git a/Plugins/WP8/Microsoft.Phone.Controls.Toolkit.dll b/Plugins/WP8/Microsoft.Phone.Controls.Toolkit.dll deleted file mode 100755 index 7d0915e66..000000000 Binary files a/Plugins/WP8/Microsoft.Phone.Controls.Toolkit.dll and /dev/null differ diff --git a/Plugins/WP8/Newtonsoft.Json.dll b/Plugins/WP8/Newtonsoft.Json.dll deleted file mode 100755 index 8b6147ddd..000000000 Binary files a/Plugins/WP8/Newtonsoft.Json.dll and /dev/null differ diff --git a/Plugins/WP8/Newtonsoft.Json.xml b/Plugins/WP8/Newtonsoft.Json.xml deleted file mode 100755 index 13cd034ad..000000000 --- a/Plugins/WP8/Newtonsoft.Json.xml +++ /dev/null @@ -1,8083 +0,0 @@ - - - - Newtonsoft.Json - - - - - Represents a BSON Oid (object id). - - - - - Initializes a new instance of the class. - - The Oid value. - - - - Gets or sets the value of the Oid. - - The value of the Oid. - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. - - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. - - - - - Initializes a new instance of the class with the specified . - - - - - Reads the next JSON token from the stream. - - true if the next token was read successfully; false if there are no more tokens to read. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Skips the children of the current token. - - - - - Sets the current token. - - The new token. - - - - Sets the current token and value. - - The new token. - The value. - - - - Sets the state based on current token type. - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Changes the to Closed. - - - - - Gets the current reader state. - - The current reader state. - - - - Gets or sets a value indicating whether the underlying stream or - should be closed when the reader is closed. - - - true to close the underlying stream or when - the reader is closed; otherwise false. The default is true. - - - - - Gets or sets a value indicating whether multiple pieces of JSON content can - be read from a continuous stream without erroring. - - - true to support reading multiple pieces of JSON content; otherwise false. The default is false. - - - - - Gets the quotation mark character used to enclose the value of a string. - - - - - Get or set how time zones are handling when reading JSON. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set how custom date formatted strings are parsed when reading JSON. - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Gets the type of the current JSON token. - - - - - Gets the text value of the current JSON token. - - - - - Gets The Common Language Runtime (CLR) type for the current JSON token. - - - - - Gets the depth of the current token in the JSON document. - - The depth of the current token in the JSON document. - - - - Gets the path of the current JSON token. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Specifies the state of the reader. - - - - - The Read method has not been called. - - - - - The end of the file has been reached successfully. - - - - - Reader is at a property. - - - - - Reader is at the start of an object. - - - - - Reader is in an object. - - - - - Reader is at the start of an array. - - - - - Reader is in an array. - - - - - The Close method has been called. - - - - - Reader has just read a value. - - - - - Reader is at the start of a constructor. - - - - - Reader in a constructor. - - - - - An error occurred that prevents the read operation from continuing. - - - - - The end of the file has been reached successfully. - - - - - Initializes a new instance of the class. - - The stream. - - - - Initializes a new instance of the class. - - The reader. - - - - Initializes a new instance of the class. - - The stream. - if set to true the root object will be read as a JSON array. - The used when reading values from BSON. - - - - Initializes a new instance of the class. - - The reader. - if set to true the root object will be read as a JSON array. - The used when reading values from BSON. - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - - A . This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Changes the to Closed. - - - - - Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary. - - - true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. - - - - - Gets or sets a value indicating whether the root object will be read as a JSON array. - - - true if the root object will be read as a JSON array; otherwise, false. - - - - - Gets or sets the used when reading values from BSON. - - The used when reading values from BSON. - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. - - - - - Creates an instance of the JsonWriter class. - - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - Writes the beginning of a Json object. - - - - - Writes the end of a Json object. - - - - - Writes the beginning of a Json array. - - - - - Writes the end of an array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the end constructor. - - - - - Writes the property name of a name/value pair on a JSON object. - - The name of the property. - - - - Writes the property name of a name/value pair on a JSON object. - - The name of the property. - A flag to indicate whether the text should be escaped when it is written as a JSON property name. - - - - Writes the end of the current Json object or array. - - - - - Writes the current token and its children. - - The to read the token from. - - - - Writes the current token. - - The to read the token from. - A flag indicating whether the current token's children should be written. - - - - Writes the specified end token. - - The end token to write. - - - - Writes indent characters. - - - - - Writes the JSON value delimiter. - - - - - Writes an indent space. - - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON without changing the writer's state. - - The raw JSON to write. - - - - Writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out the given white space. - - The string of white space characters. - - - - Sets the state of the JsonWriter, - - The JsonToken being written. - The value being written. - - - - Gets or sets a value indicating whether the underlying stream or - should be closed when the writer is closed. - - - true to close the underlying stream or when - the writer is closed; otherwise false. The default is true. - - - - - Gets the top. - - The top. - - - - Gets the state of the writer. - - - - - Gets the path of the writer. - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling when writing JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written to JSON text. - - - - - Get or set how and values are formatting when writing JSON text. - - - - - Gets or sets the culture used when writing JSON. Defaults to . - - - - - Initializes a new instance of the class. - - The stream. - - - - Initializes a new instance of the class. - - The writer. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Writes the end. - - The token. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - - - - Writes the beginning of a Json array. - - - - - Writes the beginning of a Json object. - - - - - Writes the property name of a name/value pair on a Json object. - - The name of the property. - - - - Closes this stream and the underlying stream. - - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value that represents a BSON object id. - - The Object ID value to write. - - - - Writes a BSON regex. - - The regex pattern. - The regex options. - - - - Gets or sets the used when writing values to BSON. - When set to no conversion will occur. - - The used when writing values to BSON. - - - - Specifies how constructors are used when initializing objects during deserialization by the . - - - - - First attempt to use the public default constructor, then fall back to single paramatized constructor, then the non-public default constructor. - - - - - Json.NET will use a non-public default constructor before falling back to a paramatized constructor. - - - - - Converts a to and from JSON and BSON. - - - - - Converts an object to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets the of the JSON produced by the JsonConverter. - - The of the JSON produced by the JsonConverter. - - - - Gets a value indicating whether this can read JSON. - - true if this can read JSON; otherwise, false. - - - - Gets a value indicating whether this can write JSON. - - true if this can write JSON; otherwise, false. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Create a custom object - - The object type to convert. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Creates an object which will then be populated by the serializer. - - Type of the object. - The created object. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can write JSON. - - - true if this can write JSON; otherwise, false. - - - - - Provides a base class for converting a to and from JSON. - - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a F# discriminated union type to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an ExpandoObject to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can write JSON. - - - true if this can write JSON; otherwise, false. - - - - - Converts a to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Gets or sets the date time styles used when converting a date to and from JSON. - - The date time styles used when converting a date to and from JSON. - - - - Gets or sets the date time format used when converting a date to and from JSON. - - The date time format used when converting a date to and from JSON. - - - - Gets or sets the culture used when converting a date to and from JSON. - - The culture used when converting a date to and from JSON. - - - - Converts a to and from a JavaScript date constructor (e.g. new Date(52231943)). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from JSON and BSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an to and from its name string value. - - - - - Initializes a new instance of the class. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets or sets a value indicating whether the written enum text should be camel case. - - true if the written enum text will be camel case; otherwise, false. - - - - Gets or sets a value indicating whether integer values are allowed. - - true if integers are allowed; otherwise, false. - - - - Converts a to and from a string (e.g. "1.2.3.4"). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts XML to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The calling serializer. - The value. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Checks if the attributeName is a namespace attribute. - - Attribute name to test. - The attribute name prefix if it has one, otherwise an empty string. - True if attribute name is for a namespace attribute, otherwise false. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produces multiple root elements. - - The name of the deserialize root element. - - - - Gets or sets a flag to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - true if the array attibute is written to the XML; otherwise, false. - - - - Gets or sets a value indicating whether to write the root JSON object. - - true if the JSON root object is omitted; otherwise, false. - - - - Specifies how dates are formatted when writing JSON text. - - - - - Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". - - - - - Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". - - - - - Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. - - - - - Date formatted strings are not parsed to a date type and are read as strings. - - - - - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . - - - - - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . - - - - - Specifies how to treat the time value when converting between string and . - - - - - Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. - - - - - Treat as a UTC. If the object represents a local time, it is converted to a UTC. - - - - - Treat as a local time if a is being converted to a string. - If a string is being converted to , convert to a local time if a time zone is specified. - - - - - Time zone information should be preserved when converting. - - - - - Specifies default value handling options for the . - - - - - - - - - Include members where the member value is the same as the member's default value when serializing objects. - Included members are written to JSON. Has no effect when deserializing. - - - - - Ignore members where the member value is the same as the member's default value when serializing objects - so that is is not written to JSON. - This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers, - decimals and floating point numbers; and false for booleans). The default value ignored can be changed by - placing the on the property. - - - - - Members with a default value but no JSON will be set to their default value when deserializing. - - - - - Ignore members where the member value is the same as the member's default value when serializing objects - and sets members to their default value when deserializing. - - - - - Specifies float format handling options when writing special floating point numbers, e.g. , - and with . - - - - - Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". - - - - - Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. - Note that this will produce non-valid JSON. - - - - - Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a property. - - - - - Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Floating point numbers are parsed to . - - - - - Floating point numbers are parsed to . - - - - - Indicates the method that will be used during deserialization for locating and loading assemblies. - - - - - In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method is used to load the assembly. - - - - - In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the Assembly class is used to load the assembly. - - - - - Specifies formatting options for the . - - - - - No special formatting is applied. This is the default. - - - - - Causes child objects to be indented according to the and settings. - - - - - Provides an interface to enable a class to return line and position information. - - - - - Gets a value indicating whether the class can return line information. - - - true if LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - Gets the current line position. - - The current line position or 0 if no line information is available (for example, HasLineInfo returns false). - - - - Instructs the how to serialize the collection. - - - - - Instructs the how to serialize the object. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Gets or sets the id. - - The id. - - - - Gets or sets the title. - - The title. - - - - Gets or sets the description. - - The description. - - - - Gets the collection's items converter. - - The collection's items converter. - - - - Gets or sets a value that indicates whether to preserve object references. - - - true to keep object reference; otherwise, false. The default is false. - - - - - Gets or sets a value that indicates whether to preserve collection's items references. - - - true to keep collection's items object references; otherwise, false. The default is false. - - - - - Gets or sets the reference loop handling used when serializing the collection's items. - - The reference loop handling. - - - - Gets or sets the type name handling used when serializing the collection's items. - - The type name handling. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with a flag indicating whether the array can contain null items - - A flag indicating whether the array can contain null items. - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Gets or sets a value indicating whether null items are allowed in the collection. - - true if null items are allowed in the collection; otherwise, false. - - - - Instructs the to use the specified constructor when deserializing that object. - - - - - Provides methods for converting between common language runtime types and JSON types. - - - - - - - - Represents JavaScript's boolean value true as a string. This field is read-only. - - - - - Represents JavaScript's boolean value false as a string. This field is read-only. - - - - - Represents JavaScript's null as a string. This field is read-only. - - - - - Represents JavaScript's undefined as a string. This field is read-only. - - - - - Represents JavaScript's positive infinity as a string. This field is read-only. - - - - - Represents JavaScript's negative infinity as a string. This field is read-only. - - - - - Represents JavaScript's NaN as a string. This field is read-only. - - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation using the specified. - - The value to convert. - The format the date will be converted to. - The time zone handling when the date is converted to a string. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation using the specified. - - The value to convert. - The format the date will be converted to. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - The string delimiter character. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Serializes the specified object to a JSON string. - - The object to serialize. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using formatting. - - The object to serialize. - Indicates how the output is formatted. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a collection of . - - The object to serialize. - A collection converters used while serializing. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using formatting and a collection of . - - The object to serialize. - Indicates how the output is formatted. - A collection converters used while serializing. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using . - - The object to serialize. - The used to serialize the object. - If this is null, default serialization settings will be used. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a type, formatting and . - - The object to serialize. - The used to serialize the object. - If this is null, default serialization settings will be used. - - The type of the value being serialized. - This parameter is used when is Auto to write out the type name if the type of the value does not match. - Specifing the type is optional. - - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using formatting and . - - The object to serialize. - Indicates how the output is formatted. - The used to serialize the object. - If this is null, default serialization settings will be used. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a type, formatting and . - - The object to serialize. - Indicates how the output is formatted. - The used to serialize the object. - If this is null, default serialization settings will be used. - - The type of the value being serialized. - This parameter is used when is Auto to write out the type name if the type of the value does not match. - Specifing the type is optional. - - - A JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string. - Serialization will happen on a new thread. - - The object to serialize. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using formatting. - Serialization will happen on a new thread. - - The object to serialize. - Indicates how the output is formatted. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Asynchronously serializes the specified object to a JSON string using formatting and a collection of . - Serialization will happen on a new thread. - - The object to serialize. - Indicates how the output is formatted. - The used to serialize the object. - If this is null, default serialization settings will be used. - - A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. - - - - - Deserializes the JSON to a .NET object. - - The JSON to deserialize. - The deserialized object from the JSON string. - - - - Deserializes the JSON to a .NET object using . - - The JSON to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - The of object being deserialized. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The JSON to deserialize. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the given anonymous type. - - - The anonymous type to deserialize to. This can't be specified - traditionally and must be infered from the anonymous type passed - as a parameter. - - The JSON to deserialize. - The anonymous type object. - The deserialized anonymous type from the JSON string. - - - - Deserializes the JSON to the given anonymous type using . - - - The anonymous type to deserialize to. This can't be specified - traditionally and must be infered from the anonymous type passed - as a parameter. - - The JSON to deserialize. - The anonymous type object. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized anonymous type from the JSON string. - - - - Deserializes the JSON to the specified .NET type using a collection of . - - The type of the object to deserialize to. - The JSON to deserialize. - Converters to use while deserializing. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type using . - - The type of the object to deserialize to. - The object to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type using a collection of . - - The JSON to deserialize. - The type of the object to deserialize. - Converters to use while deserializing. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type using . - - The JSON to deserialize. - The type of the object to deserialize to. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized object from the JSON string. - - - - Asynchronously deserializes the JSON to the specified .NET type. - Deserialization will happen on a new thread. - - The type of the object to deserialize to. - The JSON to deserialize. - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type using . - Deserialization will happen on a new thread. - - The type of the object to deserialize to. - The JSON to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type. - Deserialization will happen on a new thread. - - The JSON to deserialize. - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Asynchronously deserializes the JSON to the specified .NET type using . - Deserialization will happen on a new thread. - - The JSON to deserialize. - The type of the object to deserialize to. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - - A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. - - - - - Populates the object with values from the JSON string. - - The JSON to populate values from. - The target object to populate values onto. - - - - Populates the object with values from the JSON string using . - - The JSON to populate values from. - The target object to populate values onto. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - - - - Asynchronously populates the object with values from the JSON string using . - - The JSON to populate values from. - The target object to populate values onto. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - - A task that represents the asynchronous populate operation. - - - - - Serializes the to a JSON string. - - The node to convert to JSON. - A JSON string of the XNode. - - - - Serializes the to a JSON string using formatting. - - The node to convert to JSON. - Indicates how the output is formatted. - A JSON string of the XNode. - - - - Serializes the to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output is formatted. - Omits writing the root object. - A JSON string of the XNode. - - - - Deserializes the from a JSON string. - - The JSON string. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized XNode - - - - Deserializes the from a JSON string nested in a root elment specified by - and writes a .NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A flag to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - The deserialized XNode - - - - Gets or sets a function that creates default . - Default settings are automatically used by serialization methods on , - and and on . - To serialize without using any default settings create a with - . - - - - - Instructs the to use the specified when serializing the member or class. - - - - - Initializes a new instance of the class. - - Type of the converter. - - - - Gets the type of the converter. - - The type of the converter. - - - - Represents a collection of . - - - - - Instructs the how to serialize the collection. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - The exception thrown when an error occurs during Json serialization or deserialization. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Instructs the to deserialize properties with no matching class member into the specified collection - and write values during serialization. - - - - - Initializes a new instance of the class. - - - - - Gets or sets a value that indicates whether to write extension data when serializing the object. - - - true to write extension data when serializing the object; otherwise, false. The default is true. - - - - - Gets or sets a value that indicates whether to read extension data when deserializing the object. - - - true to read extension data when deserializing the object; otherwise, false. The default is true. - - - - - Instructs the not to serialize the public field or public read/write property value. - - - - - Instructs the how to serialize the object. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified member serialization. - - The member serialization. - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Gets or sets the member serialization. - - The member serialization. - - - - Gets or sets a value that indicates whether the object's properties are required. - - - A value indicating whether the object's properties are required. - - - - - Instructs the to always serialize the member with the specified name. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified name. - - Name of the property. - - - - Gets or sets the converter used when serializing the property's collection items. - - The collection's items converter. - - - - Gets or sets the null value handling used when serializing this property. - - The null value handling. - - - - Gets or sets the default value handling used when serializing this property. - - The default value handling. - - - - Gets or sets the reference loop handling used when serializing this property. - - The reference loop handling. - - - - Gets or sets the object creation handling used when deserializing this property. - - The object creation handling. - - - - Gets or sets the type name handling used when serializing this property. - - The type name handling. - - - - Gets or sets whether this property's value is serialized as a reference. - - Whether this property's value is serialized as a reference. - - - - Gets or sets the order of serialization and deserialization of a member. - - The numeric order of serialization or deserialization. - - - - Gets or sets a value indicating whether this property is required. - - - A value indicating whether this property is required. - - - - - Gets or sets the name of the property. - - The name of the property. - - - - Gets or sets the the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - Gets or sets the the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets whether this property's collection items are serialized as a reference. - - Whether this property's collection items are serialized as a reference. - - - - The exception thrown when an error occurs while reading Json text. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - The exception thrown when an error occurs during Json serialization or deserialization. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Serializes and deserializes objects into and from the JSON format. - The enables you to control how objects are encoded into JSON. - - - - - Initializes a new instance of the class. - - - - - Creates a new instance. - The will not use default settings. - - - A new instance. - The will not use default settings. - - - - - Creates a new instance using the specified . - The will not use default settings. - - The settings to be applied to the . - - A new instance using the specified . - The will not use default settings. - - - - - Creates a new instance. - The will use default settings. - - - A new instance. - The will use default settings. - - - - - Creates a new instance using the specified . - The will use default settings. - - The settings to be applied to the . - - A new instance using the specified . - The will use default settings. - - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to reader values from. - The target object to populate values onto. - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to reader values from. - The target object to populate values onto. - - - - Deserializes the Json structure contained by the specified . - - The that contains the JSON structure to deserialize. - The being deserialized. - - - - Deserializes the Json structure contained by the specified - into an instance of the specified type. - - The containing the object. - The of object being deserialized. - The instance of being deserialized. - - - - Deserializes the Json structure contained by the specified - into an instance of the specified type. - - The containing the object. - The type of the object to deserialize. - The instance of being deserialized. - - - - Deserializes the Json structure contained by the specified - into an instance of the specified type. - - The containing the object. - The of object being deserialized. - The instance of being deserialized. - - - - Serializes the specified and writes the Json structure - to a Stream using the specified . - - The used to write the Json structure. - The to serialize. - - - - Serializes the specified and writes the Json structure - to a Stream using the specified . - - The used to write the Json structure. - The to serialize. - - The type of the value being serialized. - This parameter is used when is Auto to write out the type name if the type of the value does not match. - Specifing the type is optional. - - - - - Serializes the specified and writes the Json structure - to a Stream using the specified . - - The used to write the Json structure. - The to serialize. - - The type of the value being serialized. - This parameter is used when is Auto to write out the type name if the type of the value does not match. - Specifing the type is optional. - - - - - Serializes the specified and writes the Json structure - to a Stream using the specified . - - The used to write the Json structure. - The to serialize. - - - - Occurs when the errors during serialization and deserialization. - - - - - Gets or sets the used by the serializer when resolving references. - - - - - Gets or sets the used by the serializer when resolving type names. - - - - - Gets or sets the used by the serializer when writing trace messages. - - The trace writer. - - - - Gets or sets how type name writing and reading is handled by the serializer. - - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how object references are preserved by the serializer. - - - - - Get or set how reference loops (e.g. a class referencing itself) is handled. - - - - - Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - - - - - Get or set how null values are handled during serialization and deserialization. - - - - - Get or set how null default are handled during serialization and deserialization. - - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how constructors are used during deserialization. - - The constructor handling. - - - - Gets or sets how metadata properties are used during deserialization. - - The metadata properties handling. - - - - Gets a collection that will be used during serialization. - - Collection that will be used during serialization. - - - - Gets or sets the contract resolver used by the serializer when - serializing .NET objects to JSON and vice versa. - - - - - Gets or sets the used by the serializer when invoking serialization callback methods. - - The context. - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written as JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Get or set how and values are formatting when writing JSON text. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. - - - true if there will be a check for additional JSON content after deserializing an object; otherwise, false. - - - - - Specifies the settings on a object. - - - - - Initializes a new instance of the class. - - - - - Gets or sets how reference loops (e.g. a class referencing itself) is handled. - - Reference loop handling. - - - - Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - - Missing member handling. - - - - Gets or sets how objects are created during deserialization. - - The object creation handling. - - - - Gets or sets how null values are handled during serialization and deserialization. - - Null value handling. - - - - Gets or sets how null default are handled during serialization and deserialization. - - The default value handling. - - - - Gets or sets a collection that will be used during serialization. - - The converters. - - - - Gets or sets how object references are preserved by the serializer. - - The preserve references handling. - - - - Gets or sets how type name writing and reading is handled by the serializer. - - The type name handling. - - - - Gets or sets how metadata properties are used during deserialization. - - The metadata properties handling. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - - The type name assembly format. - - - - Gets or sets how constructors are used during deserialization. - - The constructor handling. - - - - Gets or sets the contract resolver used by the serializer when - serializing .NET objects to JSON and vice versa. - - The contract resolver. - - - - Gets or sets the used by the serializer when resolving references. - - The reference resolver. - - - - Gets or sets the used by the serializer when writing trace messages. - - The trace writer. - - - - Gets or sets the used by the serializer when resolving type names. - - The binder. - - - - Gets or sets the error handler called during serialization and deserialization. - - The error handler called during serialization and deserialization. - - - - Gets or sets the used by the serializer when invoking serialization callback methods. - - The context. - - - - Get or set how and values are formatting when writing JSON text. - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - - - - - Indicates how JSON text output is formatted. - - - - - Get or set how dates are written to JSON text. - - - - - Get or set how time zones are handling during serialization and deserialization. - - - - - Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Get or set how special floating point numbers, e.g. , - and , - are written as JSON. - - - - - Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Get or set how strings are escaped when writing JSON text. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Gets a value indicating whether there will be a check for additional content after deserializing an object. - - - true if there will be a check for additional content after deserializing an object; otherwise, false. - - - - - Represents a reader that provides fast, non-cached, forward-only access to JSON text data. - - - - - Initializes a new instance of the class with the specified . - - The TextReader containing the XML data to read. - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Changes the state to closed. - - - - - Gets a value indicating whether the class can return line information. - - - true if LineNumber and LinePosition can be provided; otherwise, false. - - - - - Gets the current line number. - - - The current line number or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Gets the current line position. - - - The current line position or 0 if no line information is available (for example, HasLineInfo returns false). - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. - - - - - Creates an instance of the JsonWriter class using the specified . - - The TextWriter to write to. - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - Writes the beginning of a Json object. - - - - - Writes the beginning of a Json array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the specified end token. - - The end token to write. - - - - Writes the property name of a name/value pair on a Json object. - - The name of the property. - - - - Writes the property name of a name/value pair on a JSON object. - - The name of the property. - A flag to indicate whether the text should be escaped when it is written as a JSON property name. - - - - Writes indent characters. - - - - - Writes the JSON value delimiter. - - - - - Writes an indent space. - - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes out the given white space. - - The string of white space characters. - - - - Gets or sets how many IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. - - - - - Gets or sets which character to use to quote attribute values. - - - - - Gets or sets which character to use for indenting when is set to Formatting.Indented. - - - - - Gets or sets a value indicating whether object names will be surrounded with quotes. - - - - - Specifies the type of Json token. - - - - - This is returned by the if a method has not been called. - - - - - An object start token. - - - - - An array start token. - - - - - A constructor start token. - - - - - An object property name. - - - - - A comment. - - - - - Raw JSON. - - - - - An integer. - - - - - A float. - - - - - A string. - - - - - A boolean. - - - - - A null token. - - - - - An undefined token. - - - - - An object end token. - - - - - An array end token. - - - - - A constructor end token. - - - - - A Date. - - - - - Byte data. - - - - - Represents a reader that provides validation. - - - - - Initializes a new instance of the class that - validates the content returned from the given . - - The to read from while validating. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. - - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Sets an event handler for receiving schema validation errors. - - - - - Gets the text value of the current JSON token. - - - - - - Gets the depth of the current token in the JSON document. - - The depth of the current token in the JSON document. - - - - Gets the path of the current JSON token. - - - - - Gets the quotation mark character used to enclose the value of a string. - - - - - - Gets the type of the current JSON token. - - - - - - Gets the Common Language Runtime (CLR) type for the current JSON token. - - - - - - Gets or sets the schema. - - The schema. - - - - Gets the used to construct this . - - The specified in the constructor. - - - - The exception thrown when an error occurs while reading Json text. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Contains the LINQ to JSON extension methods. - - - - - Returns a collection of tokens that contains the ancestors of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains the ancestors of every node in the source collection. - - - - Returns a collection of tokens that contains the descendants of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains the descendants of every node in the source collection. - - - - Returns a collection of child properties of every object in the source collection. - - An of that contains the source collection. - An of that contains the properties of every object in the source collection. - - - - Returns a collection of child values of every object in the source collection with the given key. - - An of that contains the source collection. - The token key. - An of that contains the values of every node in the source collection with the given key. - - - - Returns a collection of child values of every object in the source collection. - - An of that contains the source collection. - An of that contains the values of every node in the source collection. - - - - Returns a collection of converted child values of every object in the source collection with the given key. - - The type to convert the values to. - An of that contains the source collection. - The token key. - An that contains the converted values of every node in the source collection with the given key. - - - - Returns a collection of converted child values of every object in the source collection. - - The type to convert the values to. - An of that contains the source collection. - An that contains the converted values of every node in the source collection. - - - - Converts the value. - - The type to convert the value to. - A cast as a of . - A converted value. - - - - Converts the value. - - The source collection type. - The type to convert the value to. - A cast as a of . - A converted value. - - - - Returns a collection of child tokens of every array in the source collection. - - The source collection type. - An of that contains the source collection. - An of that contains the values of every node in the source collection. - - - - Returns a collection of converted child tokens of every array in the source collection. - - An of that contains the source collection. - The type to convert the values to. - The source collection type. - An that contains the converted values of every node in the source collection. - - - - Returns the input typed as . - - An of that contains the source collection. - The input typed as . - - - - Returns the input typed as . - - The source collection type. - An of that contains the source collection. - The input typed as . - - - - Represents a collection of objects. - - The type of token - - - - Gets the with the specified key. - - - - - - Represents a JSON array. - - - - - - - - Represents a token that can contain other tokens. - - - - - Represents an abstract JSON token. - - - - - Compares the values of two tokens, including the values of all descendant tokens. - - The first to compare. - The second to compare. - true if the tokens are equal; otherwise false. - - - - Adds the specified content immediately after this token. - - A content object that contains simple content or a collection of content objects to be added after this token. - - - - Adds the specified content immediately before this token. - - A content object that contains simple content or a collection of content objects to be added before this token. - - - - Returns a collection of the ancestor tokens of this token. - - A collection of the ancestor tokens of this token. - - - - Returns a collection of the sibling tokens after this token, in document order. - - A collection of the sibling tokens after this tokens, in document order. - - - - Returns a collection of the sibling tokens before this token, in document order. - - A collection of the sibling tokens before this token, in document order. - - - - Gets the with the specified key converted to the specified type. - - The type to convert the token to. - The token key. - The converted token value. - - - - Returns a collection of the child tokens of this token, in document order. - - An of containing the child tokens of this , in document order. - - - - Returns a collection of the child tokens of this token, in document order, filtered by the specified type. - - The type to filter the child tokens on. - A containing the child tokens of this , in document order. - - - - Returns a collection of the child values of this token, in document order. - - The type to convert the values to. - A containing the child values of this , in document order. - - - - Removes this token from its parent. - - - - - Replaces this token with the specified token. - - The value. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Returns the indented JSON for this token. - - - The indented JSON for this token. - - - - - Returns the JSON for this token using the given formatting and converters. - - Indicates how the output is formatted. - A collection of which will be used when writing the token. - The JSON for this token using the given formatting and converters. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Creates an for this token. - - An that can be used to read this token and its descendants. - - - - Creates a from an object. - - The object that will be used to create . - A with the value of the specified object - - - - Creates a from an object using the specified . - - The object that will be used to create . - The that will be used when reading the object. - A with the value of the specified object - - - - Creates the specified .NET type from the . - - The object type that the token will be deserialized to. - The new object created from the JSON value. - - - - Creates the specified .NET type from the . - - The object type that the token will be deserialized to. - The new object created from the JSON value. - - - - Creates the specified .NET type from the using the specified . - - The object type that the token will be deserialized to. - The that will be used when creating the object. - The new object created from the JSON value. - - - - Creates the specified .NET type from the using the specified . - - The object type that the token will be deserialized to. - The that will be used when creating the object. - The new object created from the JSON value. - - - - Creates a from a . - - An positioned at the token to read into this . - - An that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Creates a from a . - - An positioned at the token to read into this . - - An that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Selects a using a JPath expression. Selects the token that matches the object path. - - - A that contains a JPath expression. - - A , or null. - - - - Selects a using a JPath expression. Selects the token that matches the object path. - - - A that contains a JPath expression. - - A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. - A . - - - - Selects a collection of elements using a JPath expression. - - - A that contains a JPath expression. - - An that contains the selected elements. - - - - Selects a collection of elements using a JPath expression. - - - A that contains a JPath expression. - - A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. - An that contains the selected elements. - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Creates a new instance of the . All child tokens are recursively cloned. - - A new instance of the . - - - - Gets a comparer that can compare two tokens for value equality. - - A that can compare two nodes for value equality. - - - - Gets or sets the parent. - - The parent. - - - - Gets the root of this . - - The root of this . - - - - Gets the node type for this . - - The type. - - - - Gets a value indicating whether this token has child tokens. - - - true if this token has child values; otherwise, false. - - - - - Gets the next sibling token of this node. - - The that contains the next sibling token. - - - - Gets the previous sibling token of this node. - - The that contains the previous sibling token. - - - - Gets the path of the JSON token. - - - - - Gets the with the specified key. - - The with the specified key. - - - - Get the first child token of this token. - - A containing the first child token of the . - - - - Get the last child token of this token. - - A containing the last child token of the . - - - - Raises the event. - - The instance containing the event data. - - - - Returns a collection of the child tokens of this token, in document order. - - - An of containing the child tokens of this , in document order. - - - - - Returns a collection of the child values of this token, in document order. - - The type to convert the values to. - - A containing the child values of this , in document order. - - - - - Returns a collection of the descendant tokens for this token in document order. - - An containing the descendant tokens of the . - - - - Adds the specified content as children of this . - - The content to be added. - - - - Adds the specified content as the first children of this . - - The content to be added. - - - - Creates an that can be used to add tokens to the . - - An that is ready to have content written to it. - - - - Replaces the children nodes of this token with the specified content. - - The content. - - - - Removes the child nodes from this token. - - - - - Merge the specified content into this . - - The content to be merged. - - - - Merge the specified content into this using . - - The content to be merged. - The used to merge the content. - - - - Occurs when the items list of the collection has changed, or the collection is reset. - - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets a value indicating whether this token has child tokens. - - - true if this token has child values; otherwise, false. - - - - - Get the first child token of this token. - - - A containing the first child token of the . - - - - - Get the last child token of this token. - - - A containing the last child token of the . - - - - - Gets the count of child JSON tokens. - - The count of child JSON tokens - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified content. - - The contents of the array. - - - - Initializes a new instance of the class with the specified content. - - The contents of the array. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - - - - Creates a from an object. - - The object that will be used to create . - A with the values of the specified object - - - - Creates a from an object. - - The object that will be used to create . - The that will be used to read the object. - A with the values of the specified object - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Determines the index of a specific item in the . - - The object to locate in the . - - The index of if found in the list; otherwise, -1. - - - - - Inserts an item to the at the specified index. - - The zero-based index at which should be inserted. - The object to insert into the . - - is not a valid index in the . - The is read-only. - - - - Removes the item at the specified index. - - The zero-based index of the item to remove. - - is not a valid index in the . - The is read-only. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Adds an item to the . - - The object to add to the . - The is read-only. - - - - Removes all items from the . - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if is found in the ; otherwise, false. - - - - - Copies to. - - The array. - Index of the array. - - - - Removes the first occurrence of a specific object from the . - - The object to remove from the . - - true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . - - The is read-only. - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets the node type for this . - - The type. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets or sets the at the specified index. - - - - - - Gets a value indicating whether the is read-only. - - true if the is read-only; otherwise, false. - - - - Represents a JSON constructor. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified name and content. - - The constructor name. - The contents of the constructor. - - - - Initializes a new instance of the class with the specified name and content. - - The constructor name. - The contents of the constructor. - - - - Initializes a new instance of the class with the specified name. - - The constructor name. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets or sets the name of this constructor. - - The constructor name. - - - - Gets the node type for this . - - The type. - - - - Gets the with the specified key. - - The with the specified key. - - - - Represents a collection of objects. - - The type of token - - - - An empty collection of objects. - - - - - Initializes a new instance of the struct. - - The enumerable. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. - - - - - Gets the with the specified key. - - - - - - Represents a JSON object. - - - - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified content. - - The contents of the object. - - - - Initializes a new instance of the class with the specified content. - - The contents of the object. - - - - Gets an of this object's properties. - - An of this object's properties. - - - - Gets a the specified name. - - The property name. - A with the specified name or null. - - - - Gets an of this object's property values. - - An of this object's property values. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - - - - Creates a from an object. - - The object that will be used to create . - A with the values of the specified object - - - - Creates a from an object. - - The object that will be used to create . - The that will be used to read the object. - A with the values of the specified object - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Gets the with the specified property name. - - Name of the property. - The with the specified property name. - - - - Gets the with the specified property name. - The exact property name will be searched for first and if no matching property is found then - the will be used to match a property. - - Name of the property. - One of the enumeration values that specifies how the strings will be compared. - The with the specified property name. - - - - Tries to get the with the specified property name. - The exact property name will be searched for first and if no matching property is found then - the will be used to match a property. - - Name of the property. - The value. - One of the enumeration values that specifies how the strings will be compared. - true if a value was successfully retrieved; otherwise, false. - - - - Adds the specified property name. - - Name of the property. - The value. - - - - Removes the property with the specified name. - - Name of the property. - true if item was successfully removed; otherwise, false. - - - - Tries the get value. - - Name of the property. - The value. - true if a value was successfully retrieved; otherwise, false. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Raises the event with the provided arguments. - - Name of the property. - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Occurs when a property value changes. - - - - - Gets the node type for this . - - The type. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets or sets the with the specified property name. - - - - - - Represents a JSON property. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class. - - The property name. - The property content. - - - - Initializes a new instance of the class. - - The property name. - The property content. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets the property name. - - The property name. - - - - Gets or sets the property value. - - The property value. - - - - Gets the node type for this . - - The type. - - - - Represents a raw JSON string. - - - - - Represents a value in JSON (string, integer, date, etc). - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Creates a comment with the given value. - - The value. - A comment with the given value. - - - - Creates a string with the given value. - - The value. - A string with the given value. - - - - Creates a null value. - - A null value. - - - - Creates a null value. - - A null value. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Indicates whether the current object is equal to another object of the same type. - - - true if the current object is equal to the parameter; otherwise, false. - - An object to compare with this object. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - - The parameter is null. - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format. - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format provider. - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format. - The format provider. - - A that represents this instance. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. - - An object to compare with this instance. - - A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: - Value - Meaning - Less than zero - This instance is less than . - Zero - This instance is equal to . - Greater than zero - This instance is greater than . - - - is not the same type as this instance. - - - - - Gets a value indicating whether this token has child tokens. - - - true if this token has child values; otherwise, false. - - - - - Gets the node type for this . - - The type. - - - - Gets or sets the underlying token value. - - The underlying token value. - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class. - - The raw json. - - - - Creates an instance of with the content of the reader's current token. - - The reader. - An instance of with the content of the reader's current token. - - - - Specifies the settings used when merging JSON. - - - - - Gets or sets the method used when merging JSON arrays. - - The method used when merging JSON arrays. - - - - Compares tokens to determine whether they are equal. - - - - - Determines whether the specified objects are equal. - - The first object of type to compare. - The second object of type to compare. - - true if the specified objects are equal; otherwise, false. - - - - - Returns a hash code for the specified object. - - The for which a hash code is to be returned. - A hash code for the specified object. - The type of is a reference type and is null. - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized Json data. - - - - - Initializes a new instance of the class. - - The token to read from. - - - - Reads the next JSON token from the stream as a . - - - A or a null reference if the next JSON token is null. This method will return null at the end of an array. - - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the stream. - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Gets the path of the current JSON token. - - - - - Specifies the type of token. - - - - - No token type has been set. - - - - - A JSON object. - - - - - A JSON array. - - - - - A JSON constructor. - - - - - A JSON object property. - - - - - A comment. - - - - - An integer value. - - - - - A float value. - - - - - A string value. - - - - - A boolean value. - - - - - A null value. - - - - - An undefined value. - - - - - A date value. - - - - - A raw JSON value. - - - - - A collection of bytes value. - - - - - A Guid value. - - - - - A Uri value. - - - - - A TimeSpan value. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating Json data. - - - - - Initializes a new instance of the class writing to the given . - - The container being written to. - - - - Initializes a new instance of the class. - - - - - Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. - - - - - Closes this stream and the underlying stream. - - - - - Writes the beginning of a Json object. - - - - - Writes the beginning of a Json array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the end. - - The token. - - - - Writes the property name of a name/value pair on a Json object. - - The name of the property. - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes out a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Gets the token being writen. - - The token being writen. - - - - Specifies how JSON arrays are merged together. - - - - Concatenate arrays. - - - Union arrays, skipping items that already exist. - - - Replace all array items. - - - Merge array items together, matched by index. - - - - Specifies the member serialization options for the . - - - - - All public members are serialized by default. Members can be excluded using or . - This is the default member serialization mode. - - - - - Only members must be marked with or are serialized. - This member serialization mode can also be set by marking the class with . - - - - - All public and private fields are serialized. Members can be excluded using or . - This member serialization mode can also be set by marking the class with - and setting IgnoreSerializableAttribute on to false. - - - - - Specifies metadata property handling options for the . - - - - - Read metadata properties located at the start of a JSON object. - - - - - Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance. - - - - - Do not try to read metadata properties. - - - - - Specifies missing member handling options for the . - - - - - Ignore a missing member and do not attempt to deserialize it. - - - - - Throw a when a missing member is encountered during deserialization. - - - - - Specifies null value handling options for the . - - - - - - - - - Include null values when serializing and deserializing objects. - - - - - Ignore null values when serializing and deserializing objects. - - - - - Specifies how object creation is handled by the . - - - - - Reuse existing objects, create new objects when needed. - - - - - Only reuse existing objects. - - - - - Always create new objects. - - - - - Specifies reference handling options for the . - Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement ISerializable. - - - - - - - - Do not preserve references when serializing types. - - - - - Preserve references when serializing into a JSON object structure. - - - - - Preserve references when serializing into a JSON array structure. - - - - - Preserve references when serializing. - - - - - Specifies reference loop handling options for the . - - - - - Throw a when a loop is encountered. - - - - - Ignore loop references and do not serialize. - - - - - Serialize loop references. - - - - - Indicating whether a property is required. - - - - - The property is not required. The default state. - - - - - The property must be defined in JSON but can be a null value. - - - - - The property must be defined in JSON and cannot be a null value. - - - - - Contains the JSON schema extension methods. - - - - - Determines whether the is valid. - - The source to test. - The schema to test with. - - true if the specified is valid; otherwise, false. - - - - - Determines whether the is valid. - - The source to test. - The schema to test with. - When this method returns, contains any error messages generated while validating. - - true if the specified is valid; otherwise, false. - - - - - Validates the specified . - - The source to test. - The schema to test with. - - - - Validates the specified . - - The source to test. - The schema to test with. - The validation event handler. - - - - An in-memory representation of a JSON Schema. - - - - - Initializes a new instance of the class. - - - - - Reads a from the specified . - - The containing the JSON Schema to read. - The object representing the JSON Schema. - - - - Reads a from the specified . - - The containing the JSON Schema to read. - The to use when resolving schema references. - The object representing the JSON Schema. - - - - Load a from a string that contains schema JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Parses the specified json. - - The json. - The resolver. - A populated from the string that contains JSON. - - - - Writes this schema to a . - - A into which this method will write. - - - - Writes this schema to a using the specified . - - A into which this method will write. - The resolver used. - - - - Returns a that represents the current . - - - A that represents the current . - - - - - Gets or sets the id. - - - - - Gets or sets the title. - - - - - Gets or sets whether the object is required. - - - - - Gets or sets whether the object is read only. - - - - - Gets or sets whether the object is visible to users. - - - - - Gets or sets whether the object is transient. - - - - - Gets or sets the description of the object. - - - - - Gets or sets the types of values allowed by the object. - - The type. - - - - Gets or sets the pattern. - - The pattern. - - - - Gets or sets the minimum length. - - The minimum length. - - - - Gets or sets the maximum length. - - The maximum length. - - - - Gets or sets a number that the value should be divisble by. - - A number that the value should be divisble by. - - - - Gets or sets the minimum. - - The minimum. - - - - Gets or sets the maximum. - - The maximum. - - - - Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute. - - A flag indicating whether the value can not equal the number defined by the "minimum" attribute. - - - - Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute. - - A flag indicating whether the value can not equal the number defined by the "maximum" attribute. - - - - Gets or sets the minimum number of items. - - The minimum number of items. - - - - Gets or sets the maximum number of items. - - The maximum number of items. - - - - Gets or sets the of items. - - The of items. - - - - Gets or sets a value indicating whether items in an array are validated using the instance at their array position from . - - - true if items are validated using their array position; otherwise, false. - - - - - Gets or sets the of additional items. - - The of additional items. - - - - Gets or sets a value indicating whether additional items are allowed. - - - true if additional items are allowed; otherwise, false. - - - - - Gets or sets whether the array items must be unique. - - - - - Gets or sets the of properties. - - The of properties. - - - - Gets or sets the of additional properties. - - The of additional properties. - - - - Gets or sets the pattern properties. - - The pattern properties. - - - - Gets or sets a value indicating whether additional properties are allowed. - - - true if additional properties are allowed; otherwise, false. - - - - - Gets or sets the required property if this property is present. - - The required property if this property is present. - - - - Gets or sets the a collection of valid enum values allowed. - - A collection of valid enum values allowed. - - - - Gets or sets disallowed types. - - The disallow types. - - - - Gets or sets the default value. - - The default value. - - - - Gets or sets the collection of that this schema extends. - - The collection of that this schema extends. - - - - Gets or sets the format. - - The format. - - - - Returns detailed information about the schema exception. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Generates a from a specified . - - - - - Generate a from the specified type. - - The type to generate a from. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - The used to resolve schema references. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - Specify whether the generated root will be nullable. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - The used to resolve schema references. - Specify whether the generated root will be nullable. - A generated from the specified type. - - - - Gets or sets how undefined schemas are handled by the serializer. - - - - - Gets or sets the contract resolver. - - The contract resolver. - - - - Resolves from an id. - - - - - Initializes a new instance of the class. - - - - - Gets a for the specified reference. - - The id. - A for the specified reference. - - - - Gets or sets the loaded schemas. - - The loaded schemas. - - - - The value types allowed by the . - - - - - No type specified. - - - - - String type. - - - - - Float type. - - - - - Integer type. - - - - - Boolean type. - - - - - Object type. - - - - - Array type. - - - - - Null type. - - - - - Any type. - - - - - Specifies undefined schema Id handling options for the . - - - - - Do not infer a schema Id. - - - - - Use the .NET type name as the schema Id. - - - - - Use the assembly qualified .NET type name as the schema Id. - - - - - Returns detailed information related to the . - - - - - Gets the associated with the validation error. - - The JsonSchemaException associated with the validation error. - - - - Gets the path of the JSON location where the validation error occurred. - - The path of the JSON location where the validation error occurred. - - - - Gets the text description corresponding to the validation error. - - The text description. - - - - Represents the callback method that will handle JSON schema validation events and the . - - - - - Allows users to control class loading and mandate what class to load. - - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - Specifies the name of the serialized object. - Specifies the name of the serialized object - The type of the object the formatter creates a new instance of. - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - The type of the object the formatter creates a new instance of. - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - - - Resolves member mappings for a type, camel casing property names. - - - - - Used by to resolves a for a given . - - - - - Used by to resolves a for a given . - - - - - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - - If set to true the will use a cached shared with other resolvers of the same type. - Sharing the cache will significantly performance because expensive reflection will only happen once but could cause unexpected - behavior if different instances of the resolver are suppose to produce different results. When set to false it is highly - recommended to reuse instances with the . - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Gets the serializable members for the type. - - The type to get serializable members for. - The serializable members for the type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates the constructor parameters. - - The constructor to create properties for. - The type's member properties. - Properties for the given . - - - - Creates a for the given . - - The matching member property. - The constructor parameter. - A created for the given . - - - - Resolves the default for the contract. - - Type of the object. - The contract's default . - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Determines which contract type is created for the given type. - - Type of the object. - A for the given type. - - - - Creates properties for the given . - - The type to create properties for. - /// The member serialization mode for the type. - Properties for the given . - - - - Creates the used by the serializer to get and set values from a member. - - The member. - The used by the serializer to get and set values from a member. - - - - Creates a for the given . - - The member's parent . - The member to create a for. - A created for the given . - - - - Resolves the name of the property. - - Name of the property. - Name of the property. - - - - Gets the resolved name of the property. - - Name of the property. - Name of the property. - - - - Gets a value indicating whether members are being get and set using dynamic code generation. - This value is determined by the runtime permissions available. - - - true if using dynamic code generation; otherwise, false. - - - - - Gets or sets a value indicating whether compiler generated members should be serialized. - - - true if serialized compiler generated members; otherwise, false. - - - - - Initializes a new instance of the class. - - - - - Resolves the name of the property. - - Name of the property. - The property name camel cased. - - - - Get and set values for a using dynamic methods. - - - - - Provides methods to get and set values. - - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Used to resolve references when serializing and deserializing JSON by the . - - - - - Resolves a reference to its object. - - The serialization context. - The reference to resolve. - The object that - - - - Gets the reference for the sepecified object. - - The serialization context. - The object to get a reference for. - The reference to the object. - - - - Determines whether the specified object is referenced. - - The serialization context. - The object to test for a reference. - - true if the specified object is referenced; otherwise, false. - - - - - Adds a reference to the specified object. - - The serialization context. - The reference. - The object to reference. - - - - The default serialization binder used when resolving and loading classes from type names. - - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - The type of the object the formatter creates a new instance of. - - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - The type of the object the formatter creates a new instance of. - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - - - Provides information surrounding an error. - - - - - Gets the error. - - The error. - - - - Gets the original object that caused the error. - - The original object that caused the error. - - - - Gets the member that caused the error. - - The member that caused the error. - - - - Gets the path of the JSON location where the error occurred. - - The path of the JSON location where the error occurred. - - - - Gets or sets a value indicating whether this is handled. - - true if handled; otherwise, false. - - - - Provides data for the Error event. - - - - - Initializes a new instance of the class. - - The current object. - The error context. - - - - Gets the current object the error event is being raised against. - - The current object the error event is being raised against. - - - - Gets the error context. - - The error context. - - - - Represents a trace writer. - - - - - Writes the specified trace level, message and optional exception. - - The at which to write this trace. - The trace message. - The trace exception. This parameter is optional. - - - - Gets the that will be used to filter the trace messages passed to the writer. - For example a filter level of Info will exclude Verbose messages and include Info, - Warning and Error messages. - - The that will be used to filter the trace messages passed to the writer. - - - - Contract details for a used by the . - - - - - Contract details for a used by the . - - - - - Contract details for a used by the . - - - - - Gets the underlying type for the contract. - - The underlying type for the contract. - - - - Gets or sets the type created during deserialization. - - The type created during deserialization. - - - - Gets or sets whether this type contract is serialized as a reference. - - Whether this type contract is serialized as a reference. - - - - Gets or sets the default for this contract. - - The converter. - - - - Gets or sets all methods called immediately after deserialization of the object. - - The methods called immediately after deserialization of the object. - - - - Gets or sets all methods called during deserialization of the object. - - The methods called during deserialization of the object. - - - - Gets or sets all methods called after serialization of the object graph. - - The methods called after serialization of the object graph. - - - - Gets or sets all methods called before serialization of the object. - - The methods called before serialization of the object. - - - - Gets or sets all method called when an error is thrown during the serialization of the object. - - The methods called when an error is thrown during the serialization of the object. - - - - Gets or sets the method called immediately after deserialization of the object. - - The method called immediately after deserialization of the object. - - - - Gets or sets the method called during deserialization of the object. - - The method called during deserialization of the object. - - - - Gets or sets the method called after serialization of the object graph. - - The method called after serialization of the object graph. - - - - Gets or sets the method called before serialization of the object. - - The method called before serialization of the object. - - - - Gets or sets the method called when an error is thrown during the serialization of the object. - - The method called when an error is thrown during the serialization of the object. - - - - Gets or sets the default creator method used to create the object. - - The default creator method used to create the object. - - - - Gets or sets a value indicating whether the default creator is non public. - - true if the default object creator is non-public; otherwise, false. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets or sets the default collection items . - - The converter. - - - - Gets or sets a value indicating whether the collection items preserve object references. - - true if collection items preserve object references; otherwise, false. - - - - Gets or sets the collection item reference loop handling. - - The reference loop handling. - - - - Gets or sets the collection item type name handling. - - The type name handling. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets the of the collection items. - - The of the collection items. - - - - Gets a value indicating whether the collection type is a multidimensional array. - - true if the collection type is a multidimensional array; otherwise, false. - - - - Handles serialization callback events. - - The object that raised the callback event. - The streaming context. - - - - Handles serialization error callback events. - - The object that raised the callback event. - The streaming context. - The error context. - - - - Sets extension data for an object during deserialization. - - The object to set extension data on. - The extension data key. - The extension data value. - - - - Gets extension data for an object during serialization. - - The object to set extension data on. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets or sets the property name resolver. - - The property name resolver. - - - - Gets the of the dictionary keys. - - The of the dictionary keys. - - - - Gets the of the dictionary values. - - The of the dictionary values. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets the object's properties. - - The object's properties. - - - - Gets or sets the property name resolver. - - The property name resolver. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Gets or sets the object member serialization. - - The member object serialization. - - - - Gets or sets a value that indicates whether the object's properties are required. - - - A value indicating whether the object's properties are required. - - - - - Gets the object's properties. - - The object's properties. - - - - Gets the constructor parameters required for any non-default constructor - - - - - Gets a collection of instances that define the parameters used with . - - - - - Gets or sets the override constructor used to create the object. - This is set when a constructor is marked up using the - JsonConstructor attribute. - - The override constructor. - - - - Gets or sets the parametrized constructor used to create the object. - - The parametrized constructor. - - - - Gets or sets the function used to create the object. When set this function will override . - This function is called with a collection of arguments which are defined by the collection. - - The function used to create the object. - - - - Gets or sets the extension data setter. - - - - - Gets or sets the extension data getter. - - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Maps a JSON property to a .NET member or constructor parameter. - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Gets or sets the name of the property. - - The name of the property. - - - - Gets or sets the type that declared this property. - - The type that declared this property. - - - - Gets or sets the order of serialization and deserialization of a member. - - The numeric order of serialization or deserialization. - - - - Gets or sets the name of the underlying member or parameter. - - The name of the underlying member or parameter. - - - - Gets the that will get and set the during serialization. - - The that will get and set the during serialization. - - - - Gets or sets the type of the property. - - The type of the property. - - - - Gets or sets the for the property. - If set this converter takes presidence over the contract converter for the property type. - - The converter. - - - - Gets or sets the member converter. - - The member converter. - - - - Gets or sets a value indicating whether this is ignored. - - true if ignored; otherwise, false. - - - - Gets or sets a value indicating whether this is readable. - - true if readable; otherwise, false. - - - - Gets or sets a value indicating whether this is writable. - - true if writable; otherwise, false. - - - - Gets or sets a value indicating whether this has a member attribute. - - true if has a member attribute; otherwise, false. - - - - Gets the default value. - - The default value. - - - - Gets or sets a value indicating whether this is required. - - A value indicating whether this is required. - - - - Gets or sets a value indicating whether this property preserves object references. - - - true if this instance is reference; otherwise, false. - - - - - Gets or sets the property null value handling. - - The null value handling. - - - - Gets or sets the property default value handling. - - The default value handling. - - - - Gets or sets the property reference loop handling. - - The reference loop handling. - - - - Gets or sets the property object creation handling. - - The object creation handling. - - - - Gets or sets or sets the type name handling. - - The type name handling. - - - - Gets or sets a predicate used to determine whether the property should be serialize. - - A predicate used to determine whether the property should be serialize. - - - - Gets or sets a predicate used to determine whether the property should be serialized. - - A predicate used to determine whether the property should be serialized. - - - - Gets or sets an action used to set whether the property has been deserialized. - - An action used to set whether the property has been deserialized. - - - - Gets or sets the converter used when serializing the property's collection items. - - The collection's items converter. - - - - Gets or sets whether this property's collection items are serialized as a reference. - - Whether this property's collection items are serialized as a reference. - - - - Gets or sets the the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets the the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - A collection of objects. - - - - - Initializes a new instance of the class. - - The type. - - - - When implemented in a derived class, extracts the key from the specified element. - - The element from which to extract the key. - The key for the specified element. - - - - Adds a object. - - The property to add to the collection. - - - - Gets the closest matching object. - First attempts to get an exact case match of propertyName and then - a case insensitive match. - - Name of the property. - A matching property if found. - - - - Gets a property by property name. - - The name of the property to get. - Type property name string comparison. - A matching property if found. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Represents a trace writer that writes to memory. When the trace message limit is - reached then old trace messages will be removed as new messages are added. - - - - - Initializes a new instance of the class. - - - - - Writes the specified trace level, message and optional exception. - - The at which to write this trace. - The trace message. - The trace exception. This parameter is optional. - - - - Returns an enumeration of the most recent trace messages. - - An enumeration of the most recent trace messages. - - - - Returns a of the most recent trace messages. - - - A of the most recent trace messages. - - - - - Gets the that will be used to filter the trace messages passed to the writer. - For example a filter level of Info will exclude Verbose messages and include Info, - Warning and Error messages. - - - The that will be used to filter the trace messages passed to the writer. - - - - - Represents a method that constructs an object. - - The object type to create. - - - - When applied to a method, specifies that the method is called when an error occurs serializing an object. - - - - - Get and set values for a using reflection. - - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Specifies how strings are escaped when writing JSON text. - - - - - Only control characters (e.g. newline) are escaped. - - - - - All non-ASCII and control characters (e.g. newline) are escaped. - - - - - HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. - - - - - Specifies what messages to output for the class. - - - - - Output no tracing and debugging messages. - - - - - Output error-handling messages. - - - - - Output warnings and error-handling messages. - - - - - Output informational messages, warnings, and error-handling messages. - - - - - Output all debugging and tracing messages. - - - - - Specifies type name handling options for the . - - - - - Do not include the .NET type name when serializing types. - - - - - Include the .NET type name when serializing into a JSON object structure. - - - - - Include the .NET type name when serializing into a JSON array structure. - - - - - Always include the .NET type name when serializing. - - - - - Include the .NET type name when the type of the object being serialized is not the same as its declared type. - - - - - Determines whether the collection is null or empty. - - The collection. - - true if the collection is null or empty; otherwise, false. - - - - - Adds the elements of the specified collection to the specified generic IList. - - The list to add to. - The collection of elements to add. - - - - Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer. - - The type of the elements of source. - A sequence in which to locate a value. - The object to locate in the sequence - An equality comparer to compare values. - The zero-based index of the first occurrence of value within the entire sequence, if found; otherwise, –1. - - - - Converts the value to the specified type. If the value is unable to be converted, the - value is checked whether it assignable to the specified type. - - The value to convert. - The culture to use when converting. - The type to convert or cast the value to. - - The converted type. If conversion was unsuccessful, the initial value - is returned if assignable to the target type. - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic that returns a result - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. - - - - - Returns a Restrictions object which includes our current restrictions merged - with a restriction limiting our type - - - - - Gets a dictionary of the names and values of an Enum type. - - - - - - Gets a dictionary of the names and values of an Enum type. - - The enum type to get names and values for. - - - - - Gets the type of the typed collection's items. - - The type. - The type of the typed collection's items. - - - - Gets the member's underlying type. - - The member. - The underlying type of the member. - - - - Determines whether the member is an indexed property. - - The member. - - true if the member is an indexed property; otherwise, false. - - - - - Determines whether the property is an indexed property. - - The property. - - true if the property is an indexed property; otherwise, false. - - - - - Gets the member's value on the object. - - The member. - The target object. - The member's value on the object. - - - - Sets the member's value on the target object. - - The member. - The target. - The value. - - - - Determines whether the specified MemberInfo can be read. - - The MemberInfo to determine whether can be read. - /// if set to true then allow the member to be gotten non-publicly. - - true if the specified MemberInfo can be read; otherwise, false. - - - - - Determines whether the specified MemberInfo can be set. - - The MemberInfo to determine whether can be set. - if set to true then allow the member to be set non-publicly. - if set to true then allow the member to be set if read-only. - - true if the specified MemberInfo can be set; otherwise, false. - - - - - Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. - - - - - Determines whether the string is all white space. Empty string will return false. - - The string to test whether it is all white space. - - true if the string is all white space; otherwise, false. - - - - - Nulls an empty string. - - The string. - Null if the string was null, otherwise the string unchanged. - - - - Specifies the state of the . - - - - - An exception has been thrown, which has left the in an invalid state. - You may call the method to put the in the Closed state. - Any other method calls results in an being thrown. - - - - - The method has been called. - - - - - An object is being written. - - - - - A array is being written. - - - - - A constructor is being written. - - - - - A property is being written. - - - - - A write method has not been called. - - - - diff --git a/Plugins/WP8/NodaTime.dll b/Plugins/WP8/NodaTime.dll deleted file mode 100755 index 36719faaa..000000000 Binary files a/Plugins/WP8/NodaTime.dll and /dev/null differ diff --git a/Plugins/WP8/NodaTime.xml b/Plugins/WP8/NodaTime.xml deleted file mode 100755 index a77621638..000000000 --- a/Plugins/WP8/NodaTime.xml +++ /dev/null @@ -1,12519 +0,0 @@ - - - - NodaTime - - - - - Indicates that a type is mutable. Some members of this type - allow state to be visibly changed. - - - - - Indicates that a type is immutable. After construction, the publicly visible - state of the object will not change. - - -

- This attribute only applies to types, not fields: - it's entirely feasible to have a readonly field of a mutable type, or a read/write - field of an immutable type. In such cases for reference types (classes and interfaces) - it's important to distinguish between the value of the variable (a reference) and the - object it refers to. Value types are more complicated as in some cases the compiler - will copy values before operating on them; however as all value types in Noda Time are - immutable (aside from explictily implemented serialization operations) this rarely causes - an issue. -

-

- Some types may be publicly immutable, but contain privately mutable - aspects, e.g. caches. If it proves to be useful to indicate the kind of - immutability we're implementing, we can add an appropriate property to this - attribute. -

-
-
- - - Attribute indicating that a particular member would normally be private (or potentially protected) - but is exposed for test purposes. - - - Currently this excludes nested types, fields, and events - but it could be expanded to do so. Likewise - we don't indicate the intended access mode, which could be done via an enum. For the moment we'll - assume everything would be private apart from for testing. - - - - - A calendar system maps the non-calendar-specific "local time line" to human concepts - such as years, months and days. - - - - Many developers will never need to touch this class, other than to potentially ask a calendar - how many days are in a particular year/month and the like. Noda Time defaults to using the ISO-8601 - calendar anywhere that a calendar system is required but hasn't been explicitly specified. - - - If you need to obtain a instance, use one of the static properties or methods in this - class, such as the property or the method. - - Although this class is currently sealed (as of Noda Time 1.2), in the future this decision may - be reversed. In any case, there is no current intention for third-party developers to be able to implement - their own calendar systems (for various reasons). If you require a calendar system which is not - currently supported, please file a feature request and we'll see what we can do. - - - - All calendar implementations are immutable and thread-safe. See the thread safety - section of the user guide for more information. - - - - - Fetches a calendar system by its unique identifier. This provides full round-tripping of a calendar - system. It is not guaranteed that calling this method twice with the same identifier will return - identical references, but the references objects will be equal. - - The ID of the calendar system. This is case-sensitive. - The calendar system with the given ID. - - No calendar system for the specified ID can be found. - - - - Returns the IDs of all calendar systems available within Noda Time. The order of the keys is not guaranteed. - - - - - Returns a calendar system that follows the rules of the ISO-8601 standard, - which is compatible with Gregorian for all modern dates. - - - - When ISO does not define a field, but it can be determined (such as AM/PM) it is included. - - - With the exception of century related fields, the ISO calendar is exactly the - same as the Gregorian calendar system. In the ISO system, centuries and year - of century are zero based. For all years, the century is determined by - dropping the last two digits of the year, ignoring sign. The year of century - is the value of the last two year digits. - - - - - - Returns a Persian (also known as Solar Hijri) calendar system. This is the main calendar in Iran - and Afghanistan, and is also used in some other countries where Persian is spoken. - - - The true Persian calendar is an astronomical one, where leap years depend on vernal equinox. - A complicated algorithmic alternative approach exists, proposed by Ahmad Birashk, - but this isn't generally used in society. The implementation here is somewhat simpler, using a - 33-year leap cycle, where years 1, 5, 9, 13, 17, 22, 26, and 30 in each cycle are leap years. - This is the same approach taken by the BCL PersianCalendar class, and the dates of - this implementation align exactly with the BCL implementation. - - A Persian calendar system. - - - - Returns a Hebrew calendar, as described at http://en.wikipedia.org/wiki/Hebrew_calendar. This is a - purely mathematical calculator, applied proleptically to the period where the real calendar was observational. - - - Please note that in version 1.3.0 of Noda Time, support for the Hebrew calendar is somewhat experimental, - particularly in terms of calculations involving adding or subtracting years. Additionally, text formatting - and parsing using month names is not currently supported, due to the challenges of handling leap months. - It is hoped that this will be improved in future versions. - The implementation for this was taken from http://www.cs.tau.ac.il/~nachum/calendar-book/papers/calendar.ps, - which is a public domain algorithm presumably equivalent to that given in the Calendrical Calculations book - by the same authors (Nachum Dershowitz and Edward Reingold). - - - The month numbering system to use - A Hebrew calendar system for the given month numbering. - - - - Returns a pure proleptic Gregorian calendar system, which defines every - fourth year as leap, unless the year is divisible by 100 and not by 400. - This improves upon the Julian calendar leap year rule. - - - Although the Gregorian calendar did not exist before 1582 CE, this - calendar system assumes it did, thus it is proleptic. This implementation also - fixes the start of the year at January 1. - - The minimum number of days in the first week of the year. - When computing the WeekOfWeekYear and WeekYear properties of a particular date, this is - used to decide at what point the week year changes. - A suitable Gregorian calendar reference; the same reference may be returned by several - calls as the object is immutable and thread-safe. - - - - Returns a pure proleptic Julian calendar system, which defines every - fourth year as a leap year. This implementation follows the leap year rule - strictly, even for dates before 8 CE, where leap years were actually - irregular. - - - Although the Julian calendar did not exist before 45 BCE, this calendar - assumes it did, thus it is proleptic. This implementation also fixes the - start of the year at January 1. - - The minimum number of days in the first week of the year. - When computing the WeekOfWeekYear and WeekYear properties of a particular date, this is - used to decide at what point the week year changes. - A suitable Julian calendar reference; the same reference may be returned by several - calls as the object is immutable and thread-safe. - - - - Returns a Coptic calendar system, which defines every fourth year as - leap, much like the Julian calendar. The year is broken down into 12 months, - each 30 days in length. An extra period at the end of the year is either 5 - or 6 days in length. In this implementation, it is considered a 13th month. - - - - Year 1 in the Coptic calendar began on August 29, 284 CE (Julian), thus - Coptic years do not begin at the same time as Julian years. This calendar - is not proleptic, as it does not allow dates before the first Coptic year. - - - This implementation defines a day as midnight to midnight exactly as per - the ISO calendar. Some references indicate that a Coptic day starts at - sunset on the previous ISO day, but this has not been confirmed and is not - implemented. - - - The minimum number of days in the first week of the year. - When computing the WeekOfWeekYear and WeekYear properties of a particular date, this is - used to decide at what point the week year changes. - A suitable Coptic calendar reference; the same reference may be returned by several - calls as the object is immutable and thread-safe. - - - - Returns an Islamic, or Hijri, calendar system. - - - - This returns a tablular calendar, rather than one based on lunar observation. This calendar is a - lunar calendar with 12 months, each of 29 or 30 days, resulting in a year of 354 days (or 355 on a leap - year). - - - Year 1 in the Islamic calendar began on July 15th or 16th, 622 CE (Julian), thus - Islamic years do not begin at the same time as Julian years. This calendar - is not proleptic, as it does not allow dates before the first Islamic year. - - - There are two basic forms of the Islamic calendar, the tabular and the - observed. The observed form cannot easily be used by computers as it - relies on human observation of the new moon. The tabular calendar, implemented here, is an - arithmetic approximation of the observed form that follows relatively simple rules. - - You should choose an epoch based on which external system you wish - to be compatible with. The epoch beginning on July 16th is the more common - one for the tabular calendar, so using - would usually be a logical choice. However, Windows uses July 15th, so - if you need to be compatible with other Windows systems, you may wish to use - . The fact that the Islamic calendar - traditionally starts at dusk, a Julian day traditionally starts at noon, - and all calendar systems in Noda Time start their days at midnight adds - somewhat inevitable confusion to the mix, unfortunately. - - The tabular form of the calendar defines 12 months of alternately - 30 and 29 days. The last month is extended to 30 days in a leap year. - Leap years occur according to a 30 year cycle. There are four recognised - patterns of leap years in the 30 year cycle: - - - OriginLeap years - Kūshyār ibn Labbān2, 5, 7, 10, 13, 15, 18, 21, 24, 26, 29 - al-Fazārī2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29 - Fātimid (also known as Misri or Bohra)2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29 - Habash al-Hasib2, 5, 8, 11, 13, 16, 19, 21, 24, 27, 30 - - - The leap year pattern to use is determined from the first parameter to this factory method. - The second parameter determines which epoch is used - the "astronomical" or "Thursday" epoch - (July 15th 622CE) or the "civil" or "Friday" epoch (July 16th 622CE). - - - This implementation defines a day as midnight to midnight exactly as per - the ISO calendar. This correct start of day is at sunset on the previous - day, however this cannot readily be modelled and has been ignored. - - - The pattern of years in the 30-year cycle to consider as leap years - The kind of epoch to use (astronomical or civil) - A suitable Islamic calendar reference; the same reference may be returned by several - calls as the object is immutable and thread-safe. - - - - Creates an ID for a calendar system which only needs to be distinguished by its name and - the minimum number of days in the first week of the week-year. - - - - - Returns the unique identifier for this calendar system. This is provides full round-trip capability - using to retrieve the calendar system from the identifier. - - - - A unique ID for a calendar is required when serializing types which include a . - As of 2 Nov 2012 (ISO calendar) there are no ISO or RFC standards for naming a calendar system. As such, - the identifiers provided here are specific to Noda Time, and are not guaranteed to interoperate with any other - date and time API. - - - - Calendar ID - Equivalent factory method - - ISO - Gregorian 1(1) - Gregorian 2(2) - Gregorian 3(3) - Gregorian 3(4) - Gregorian 5(5) - Gregorian 6(6) - Gregorian 7(7) - Coptic 1(1) - Coptic 2(2) - Coptic 3(3) - Coptic 4(4) - Coptic 5(5) - Coptic 6(6) - Coptic 7(7) - Julian 1(1) - Julian 2(2) - Julian 3(3) - Julian 4(4) - Julian 5(5) - Julian 6(6) - Julian 7(7) - Hijri Civil-Indian(IslamicLeapYearPattern.Indian, IslamicEpoch.Civil) - Hijri Civil-Base15(IslamicLeapYearPattern.Base15, IslamicEpoch.Civil) - Hijri Civil-Base16(IslamicLeapYearPattern.Base16, IslamicEpoch.Civil) - Hijri Civil-HabashAlHasib(IslamicLeapYearPattern.HabashAlHasib, IslamicEpoch.Civil) - Hijri Astronomical-Indian(IslamicLeapYearPattern.Indian, IslamicEpoch.Astronomical) - Hijri Astronomical-Base15(IslamicLeapYearPattern.Base15, IslamicEpoch.Astronomical) - Hijri Astronomical-Base16(IslamicLeapYearPattern.Base16, IslamicEpoch.Astronomical) - Hijri Astronomical-HabashAlHasib(IslamicLeapYearPattern.HabashAlHasib, IslamicEpoch.Astronomical) - Persian - Hebrew - - - - - - Returns the name of this calendar system. Each kind of calendar system has a unique name, but this - does not usually provide enough information for round-tripping. (For example, the name of an - Islamic calendar system does not indicate which kind of leap cycle it uses, and other calendars - specify the minimum number of days in the first week of a year.) - - - - - Returns whether the day-of-week field refers to ISO days. If true, types such as - can use the property to avoid using magic numbers. - This defaults to true, but can be overridden by specific calendars. - - - - - The minimum valid year (inclusive) within this calendar. - - - - - The maximum valid year (inclusive) within this calendar. - - - - - Returns the minimum tick number this calendar can handle. - - - - - Returns the maximum tick number this calendar can handle. - - - - - Returns a read-only list of eras used in this calendar system. - - - - - Returns the "absolute year" (the one used throughout most of the API, without respect to eras) - from a year-of-era and an era. - - - For example, in the Gregorian and Julian calendar systems, the BCE era starts at year 1, which is - equivalent to an "absolute year" of 0 (then BCE year 2 has an absolute year of -1, and so on). The absolute - year is the year that is used throughout the API; year-of-era is typically used primarily when formatting - and parsing date values to and from text. - - The year within the era. - The era in which to consider the year - The absolute year represented by the specified year of era. - is out of the range of years for the given era. - is not an era used in this calendar. - - - - Returns the maximum valid year-of-era in the given era. - - The era in which to find the greatest year - The maximum valid year in the given era. - is not an era used in this calendar. - - - - Returns the minimum valid year-of-era in the given era. - - The era in which to find the greatest year - The minimum valid year in the given eraera. - is not an era used in this calendar. - - - - Convenience method to perform nullity and validity checking on the era, converting it to - the index within the list of eras used in this calendar system. - - - - - Returns the local date corresponding to the given "week year", "week of week year", and "day of week" - in this calendar system. - - ISO-8601 week year of value to return - ISO-8601 week of week year of value to return - ISO-8601 day of week to return - The date corresponding to the given week year / week of week year / day of week. - - - - Returns a local instant, at the start of the day formed from the given year of era, month, day, and era arguments. - The set of given values must refer to a valid datetime. - - Era to use. This must be one of the eras used in this calendar - Year of era to use - Month to use - Day of month to use - is not an era used in this calendar. - The year of era, month of year and day of month values don't - form a valid date. - A with the given year, month, day and era. - - - - Returns a local instant, formed from the given year, month, day, - hour, minute, second, millisecond and ticks values. - - Absolute year (not year within era; may be negative) - Month of year - Day of month - Hour within the day (0-23) - Minute within the hour - Second within the minute - Millisecond within the second - Tick within the millisecond - A with the given values. - - - - Converts this calendar system to text by simply returning its unique ID. - - The ID of this calendar system. - - - - Returns the IsoDayOfWeek corresponding to the day of week for the given local instant - if this calendar uses ISO days of the week, or throws an InvalidOperationException otherwise. - - The local instant to use to find the day of the week - The day of the week as an IsoDayOfWeek - - - - Returns the number of days in the given month within the given year. - - The year in which to consider the month - The month to determine the number of days in - The given year / month combination - is invalid for this calendar. - The number of days in the given month and year. - - - - Returns whether or not the given year is a leap year in this calendar. - - The year to consider. - The given year is invalid for this calendar. - Note that some implementations may return a value rather than throw this exception. Failure to throw an - exception should not be treated as an indication that the year is valid. - True if the given year is a leap year; false otherwise. - - - - The maximum valid month (inclusive) within this calendar in the given year. It is assumed that - all calendars start with month 1 and go up to this month number in any valid year. - - The year to consider. - The given year is invalid for this calendar. - Note that some implementations may return a month rather than throw this exception (for example, if all - years have the same number of months in this calendar system). Failure to throw an exception should not be - treated as an indication that the year is valid. - The maximum month number within the given year. - - - - See - but this uses a pre-validated index. - This default implementation returns the maximum year for this calendar, which is - a valid implementation for single-era calendars. - - - - - See - but this uses a pre-validated index. - This default implementation returns 1, but can be overridden by derived classes. - - - - - See - but this uses a pre-validated index. - This default implementation validates that the year is between 1 and MaxYear inclusive, - but then returns it as-is, expecting that there's no further work to be - done. This is valid for single-era calendars; the method should be overridden for multi-era calendars. - - - - - Exception thrown to indicate that the specified local date/time occurs twice - in a particular time zone due to daylight saving time changes. - - - - This occurs for transitions where the clock goes backward (usually by - an hour). For example, suppose the time zone goes backward - at 2am, so the second after 01:59:59 becomes 01:00:00. In that case, - times such as 01:30:00 occur twice. - - - This exception is used to indicate such problems, as they're usually - not the same as other causes, - such as entering "15" for a month number. - - - In theory this isn't calendar-specific; the local value will be ambiguous in - this time zone regardless of the calendar used. However, this exception is - always created in conjunction with a specific calendar, which leads to a more - natural way of examining its information and constructing an error message. - - - Any public static members of this type are thread safe. Any instance members are not guaranteed to be thread safe. - See the thread safety section of the user guide for more information. - - - - - The local date and time which is ambiguous in the time zone. - - - - - The time zone in which the local date and time is ambiguous. - - - - - The earlier of the two occurrences of the local date and time within the time zone. - - - - - The later of the two occurrences of the local date and time within the time zone. - - - - - Constructs an instance from the given information. - - - - User code is unlikely to need to deliberately call this constructor except - possibly for testing. - - - The two mappings must have the same local time and time zone. - - - The earlier possible mapping - The later possible mapping - - - - Represents an era used in a calendar. - - All the built-in calendars in Noda Time use the values specified by the static - read-only fields in this class. These may be compared for reference equality to check for specific - eras. - This type is immutable reference type. See the thread safety section of the user guide for more information. - - - - The "Common" era (CE), also known as Anno Domini (AD). This is used in the ISO, Gregorian and Julian calendars. - - - - - The "before common" era (BCE), also known as Before Christ (BC). This is used in the ISO, Gregorian and Julian calendars. - - - - - The "Anno Martyrum" or "Era of the Martyrs". This is the sole era used in the Coptic calendar. - - - - - The "Anno Martyrum" or "Era of the Martyrs". This is the sole era used in the Coptic calendar. - - - - - The "Anno Hegira" era. This is the sole era used in the Hijri (Islamic) calendar. - - - - - The "Anno Mundi" era. This is the sole era used in the Hebrew calendar. - - - - - The "Anno Persico" era. This is the sole era used in the Persian calendar. - - - - - Returns the name of this era, e.g. "CE" or "BCE". - - - - - Returns the name of this era. - - The name of this era. - - - - Abstract implementation of a year/month/day calculator based around months which always have 30 days. - - - As the month length is fixed various calculations can be optimised. - This implementation assumes any additional days after twelve - months fall into a thirteenth month. - - - - - Implementation of the algorithms described in - http://www.cs.tau.ac.il/~nachum/calendar-book/papers/calendar.ps, using scriptural - month numbering. - - - - - Returns the cached "absolute day at start of year / IsHeshvanLong / IsKislevShort" combination, - populating the cache if necessary. Bits 0-22 are the "elapsed days start of year"; bit 23 is - "is Heshvan long"; bit 24 is "is Kislev short". If the year is out of the range for the cache, - the value is populated but not cached. - - - - - - Computes the cache entry value for the given year, but without populating the cache. - - - - - Returns the "absolute day number" for the given year, month and day in the Hebrew calendar. - The absolute day number of 0001-01-01 AD (Gregorian) is 1. - - - - - Converts an "absolute day number" into a year, month and day in the Hebrew calendar. - The absolute day number of 0001-01-01 AD (Gregorian) is 1. - - - - - Conversions between civil and scriptural month numbers in the Hebrew calendar system. - - - - - Given a civil month number and a year in which it occurs, this method returns - the equivalent scriptural month number. - - - No validation is performed in this method: an input month number of 13 in a non-leap-year - will return a result of 7. - - Year during which the month occurs. - Civil month number. - The scriptural month number. - - - - Given an scriptural month number and a year in which it occurs, this method returns - the equivalent scriptural month number. - - - No validation is performed in this method: an input month number of 13 in a non-leap-year - will return a result of 7. - - Year during which the month occurs. - Civil month number. - The scriptural month number. - - - - The month numbering to use for the Hebrew calendar. - - - When requesting a Hebrew calendar with , a month numbering - system needs to be specified. There are two main ways of numbering the Hebrew months: the civil - system where month 1 is the start of the new year (Tishri) and scriptural system where month 1 is - Nisan, according to biblical custom. - - - - - - The numbering system where month 1 is Tishri. This has the advantage of familiarity with other - calendars where the first month is 1; it is easier to tell which date comes before which, aside - from anything else. It is also the numbering system used by the BCL. - - The main disadvantage is that due to leap years effectively "splitting" Adar into Adar I - and Adar II, the months after that (Nisan, Iyyar and so on) have month numberings which depend - on the year. - - - - - - The numbering system where month 1 is Nisan. This is the numbering system which matches biblical - custom (such as Leviticus 23:5). This has the advantage that the split of Adar is at the end of the - numbering system, so all other month names are stable. - - The primary disadvantage of this numbering system is that months 1-6 come after months 7-12 (or 13), - which is counter-intuitive. - - - - - See for details. This is effectively - an adapter around . - - - - - Returns whether or not the given year is a leap year - that is, one with 13 months. This is - not quite the same as a leap year in (say) the Gregorian calendar system... - - - - - Change the year, maintaining month and day as well as possible. This doesn't - work in the same way as other calendars; see http://judaism.stackexchange.com/questions/39053 - for the reasoning behind the rules. - - - - - Converts a LocalInstant into an absolute day number. - - - - - The epoch to use when constructing an Islamic calendar. - - - The Islamic, or Hijri, calendar can either be constructed - starting on July 15th 622CE (in the Julian calendar) or on the following day. - The former is the "astronomical" or "Thursday" epoch; the latter is the "civil" or "Friday" epoch. - - - - - - Epoch beginning on July 15th 622CE (Julian), which is July 18th 622 CE in the Gregorian calendar. - - - - - Epoch beginning on July 16th 622CE (Julian), which is July 19th 622 CE in the Gregorian calendar. - - - - - The pattern of leap years to use when constructing an Islamic calendar. - - - - The Islamic, or Hijri, calendar is a lunar calendar of 12 months, each of 29 or 30 days. - The calendar can be defined in either observational or tabular terms; - Noda Time implements a tabular calendar, where a pattern of leap years (in which the last month has - an extra day) repeats every 30 years, according to one of the patterns within this enum. - - - While the patterns themselves are reasonably commonly documented (see e.g. - Wikipedia) - there is little standardization in terms of naming the patterns. I hope the current names do not - cause offence to anyone; suggestions for better names would be welcome. - - - - - - - A pattern of leap years in 2, 5, 7, 10, 13, 15, 18, 21, 24, 26 and 29. - This pattern and are the most commonly used ones, - and only differ in whether the 15th or 16th year is deemed leap. - - - - - A pattern of leap years in 2, 5, 7, 10, 13, 16, 18, 21, 24, 26 and 29. - This pattern and are the most commonly used ones, - and only differ in whether the 15th or 16th year is deemed leap. - - - - - A pattern of leap years in 2, 5, 8, 10, 13, 16, 19, 21, 24, 27 and 29. - - - - - A pattern of leap years in 2, 5, 8, 11, 13, 16, 19, 21, 24, 27 and 30. - - - - Days in a pair of months, in days. - - - The length of a long month, in days. - - - The length of a short month, in days. - - - The typical number of ticks in a year. - - - The number of days in a non-leap year. - - - The number of days in a leap year. - - - The number of ticks in a non-leap year. - - - The ticks for the civil (Friday) epoch of July 16th 622CE. - - - The ticks for the civil (Thursday) epoch of July 15th 622CE. - - - The length of the cycle of leap years. - - - The number of days in leap cycle. - - - The pattern of leap years within a cycle, one bit per year, for this calendar. - - - - Returns the pattern of leap years within a cycle, one bit per year, for the specified pattern. - Note that although cycle years are usually numbered 1-30, the bit pattern is for 0-29; cycle year - 30 is represented by bit 0. - - - - - Returns the LocalInstant ticks at the specified epoch. - - - - - The ISO-8601 calendar is equivalent to the Gregorian calendar but the century - and year-of-century are 0-based, and for negative centuries the year is treated as 0-based too. - (This may be a bug in previous versions of Noda Time, but we should be backward compatible - at least until we know for sure.) - - - - - - The NodaTime.Calendars namespace contains types related to calendars beyond the - type in the core NodaTime namespace. - - - - - - Implementation of the Persian (Solar Hijri) calendar. This is an algorithmic - implementation rather than the true observational version, and it follows the - simple 33 year leap cycle implemented by .NET rather than the more complicated - form of variable-length cycles and grand cycles devised by Ahmad Birashk. - - - - The ticks for the epoch of March 21st 622CE. - - - - Subclass of YearMonthDayCalculator for calendars with the following attributes: - - A fixed number of months - Occasional leap years which are always 1 day longer than non-leap years - - - - - - Common operations on ticks. - - - - - Converts a number of ticks into days, rounding down. The number of ticks must be - non-negative (to have an easily-predictable outcome), but this is *not* validated in this method. - This method is equivalent to dividing by NodaConstants.TicksPerStandardDay, but appears to be - very significantly faster under the x64 JIT (and no slower under the x86 JIT). - See http://stackoverflow.com/questions/22258070 for the inspiration. - - - - - Converts a number of ticks into days, rounding down. This method works with any number of - ticks, so long as it's not within the earliest representable 24 hours (where Noda Time arithmetic - tends to go pear-shaped anyway...) - - - - - Calculator to handle time-of-day related fields. - This is a static class because we don't intend to model - different lengths of days, or hours etc. (We have no state - at all, and need no polymorphism.) - - - - - Calculator for week-year, week-of-week-year and day-of-week-based calculations. - - - - - Finds the week-of-week year containing the given local instant, by finding out when the week year - started, and then simply dividing "how far we are through the year" by "the number of ticks in a week". - - - - - Returns the ticks at the start of the given week-year. - - - - - Finds the week-year containing the given local instant. - - - - - Just a useful struct to be hand a whole year/month/day value in one go. - This type is a dumb calendar-neutral type; it's just a composition of - three integers. - - - - - Cache to speed up working out when a particular year starts. - See the documentation and - for more details. - - - - - Array of eras in this calculator; this is never mutated. - - - - - Only exposed outside the calculator for validation by tests. - - - - - Returns the number of ticks from the start of the given year to the start of the given month. - - - - - Compute the start of the given year in days since 1970-01-01 ISO. The year may be outside - the bounds advertised by the calendar, but only by a single year - this is - used for internal calls which sometimes need to compare a valid value with - an invalid one, for estimates etc. - - - - - Subtract subtrahendInstant from minuendInstant, in terms of months. - - - - - Returns the number of ticks since the Unix epoch at the start of the given year. - This is virtual to allow GregorianCalendarSystem to override it for an ultra-efficient - cache for modern years. This method can cope with a value for outside - the normal range, so long as the resulting computation doesn't overflow. (Min and max years - are therefore chosen to be slightly more restrictive than we would otherwise need, for the - sake of simplicity.) This is useful for values which first involve estimates which might be out - by a year either way. - - - - - Computes the ticks of the local instant at the start of the given year/month/day. - This assumes all parameters have been validated previously. - - - - - Returns the number of ticks (the LocalInstant, effectively) at the start of the - given year/month. - - - - - Era-based year/month/day: this implementation ignores the era, which is valid for single-era - calendars, although it does validate the era first. - - - - - Convenience method to perform nullity and validity checking on the era, converting it to - the index within the list of eras used in this calendar system. - - - - - Returns the year-of-era for the given local instant. The base implementation is to return the plain - year, which is suitable for single-era calendars. - - - - - Handling for century-of-era where (say) year 123 is in century 2... but so is year 200. - - - - - Handling for year-of-century in the range [1, 100]. - - - - - Returns the era for the given local instant. The base implementation is to return 0, which is - suitable for single-era calendars. - - - - - Default implementation of GetAbsoluteYear which assumes a single era. - - - - - See - but this uses a pre-validated index. - This default implementation returns 1, but can be overridden by derived classes. - - - - - See - but this uses a pre-validated index. - This default implementation returns the maximum year for this calendar, which is - a valid implementation for single-era calendars. - - - - - Fetches the start of the year (in days since 1970-01-01 ISO) from the cache, or calculates - and caches it. - - - - - Type containing as much logic as possible for how the cache of "start of year" data works. - As of Noda Time 1.3, this is not specific to YearMonthDayCalculator - it can be used for - other frames of reference, so long as they comply with the restrictions listed below. - - - - Each entry in the cache is a 32-bit number. The "value" part of the entry consists of the - number of days since the Unix epoch (negative for a value before the epoch). As Noda Time - only supports a number of ticks since the Unix epoch of between long.MinValue and long.MaxValue, - we only need to support a number of days in the range - [long.MinValue / TicksPerDay, long.MaxValue / TicksPerDay] which is [-10675200, 10675200] (rounding - away from 0). This value can be stored in 25 bits. - - - The remaining 7 bits of the value are used for validation. For any given year, the bottom - 10 bits are used as the index into the cache (which is an array). The next 7 most significant - bits are stored in the entry. So long as we have fewer than 17 significant bits in the year value, - this will be a unique combination. A single validation value (the most highly positive value) is - reserved to indicate an invalid entry. The cache is initialized with all entries invalid. - This gives us a range of year numbers greater than [-60000, 60000] without any risk of collisions. By - contrast, the ISO calendar years are in the range [-27255, 31195] - so we'd have to be dealing with a - calendar with either very short years, or an epoch a long way ahead or behind the Unix epoch. - - - The fact that each cache entry is only 32 bits means that we can safely use the cache from multiple - threads without locking. 32-bit aligned values are guaranteed to be accessed atomically, so we know we'll - never get the value for one year with the validation bits for another, for example. - - - - - - Entry which is guaranteed to be obviously invalid for any real date, by having - a validation value which is larger than any valid year number. - - - - - Entry value: most significant 25 bits are the number of days (e.g. since the Unix epoch); remaining 7 bits are - the validator. - - - - - Returns the validator to use for a given year, a non-negative number containing at most - EntryValidationBits bits. - - - - - Returns the cache index, in [0, CacheSize), that should be used to store the given year's cache entry. - - - - - Returns whether this cache entry is valid for the given year, and so is safe to use. (We assume that we - have located this entry via the correct cache index.) - - - - - Returns the (signed) number of days since the Unix epoch for the cache entry. - - - - - Static access to date/time zone providers built into Noda Time and for global configuration where this is unavoidable. - All properties are thread-safe, and the providers returned by the read-only properties cache their results. - - - - - Gets a time zone provider which uses a . - The underlying source is , which is initialized from - resources within the NodaTime assembly. - - - - - The to use to interpret a time zone ID read as part of - XML or binary serialization. - - - This property defaults to . The mere existence of - this property is unfortunate, but XML and binary serialization in .NET provide no simple way of configuring - appropriate context. It is expected that any single application is unlikely to want to serialize - ZonedDateTime values using different time zone providers. - - - - - Period field which uses a to add/subtract months. - - - - - Period field class representing a field with a fixed duration regardless of when it occurs. - - - - - General representation of the difference between two LocalInstant values in a particular unit, - such as "months" or "hours". This is effectively a vector type: it doesn't make sense to ask - a period field for its value at a particular local instant; instead, a number of units can be - added to an existing local instant, and you can request the difference between two local instants - in terms of that unit. - - - - - Adds a duration value (which may be negative) to the instant. This may not - be reversible; for example, adding a month to January 30th will result in - February 28th or February 29th. - - The local instant to add to - The value to add, in the units of the field - The updated local instant - - - - Computes the difference between two local instants, as measured in the units - of this field. Any fractional units are dropped from the result. Calling - Subtract reverses the effect of calling Add, as far as possible. - - - The result is determined so as not to overshoot when added back: calling - using and - the result of this method will yield a value which is between - and . (In a simpler world, it would exactly equal - , but that's not always possible.) - - The local instant to subtract from - The local instant to subtract from minuendInstant - The difference in the units of this field - - - - - The NodaTime.Fields namespace contains types related to individual period fields. - All types within this namespace are internal. - - - - - - Period field which uses a to add/subtract years. - - - - - An immutable collection of date/time and period fields. - - - - - Mutable set of fields which can be built into a full, immutable FieldSet. - - - - - - The NodaTime.Globalization namespace contains types related to culture-sensitive - aspects of behaviour, principally for the sake of text formatting and parsing. - - - - - - A for Noda Time types, initialised from a . - This provides a single place defining how NodaTime values are formatted and displayed, depending on the culture. - - - Currently this is "shallow-immutable" - although none of these properties can be changed, the - CultureInfo itself may be mutable. In the future we will make this fully immutable. - - Instances which use read-only CultureInfo instances are immutable, - and may be used freely between threads. Instances with mutable cultures should not be shared between threads - without external synchronization. - See the thread safety section of the user guide for more information. - - - - A NodaFormatInfo wrapping the invariant culture. - - - - - Initializes a new instance of the class. - - The culture info to base this on. - - - - The BCL returns arrays of month names starting at 0; we want a read-only list starting at 1 (with 0 as null). - - - - - The BCL returns arrays of week names starting at 0 as Sunday; we want a read-only list starting at 1 (with 0 as null) - and with 7 as Sunday. - - - - - Checks whether any of the genitive names differ from the non-genitive names, and returns - either a reference to the non-genitive names or a converted list as per ConvertMonthArray. - - - - Mono uses the invariant month names for the genitive month names by default, so we'll assume that - if we see an invariant name, that *isn't* deliberately a genitive month name. A non-invariant culture - which decided to have genitive month names exactly matching the invariant ones would be distinctly odd. - See http://bugzilla.xamarin.com/show_bug.cgi?id=3278 for more details and progress. - - - Mono 3.0.6 has an exciting and different bug, where all the abbreviated genitive month names are just numbers ("1" etc). - So again, if we detect that, we'll go back to the non-genitive version. - See http://bugzilla.xamarin.com/show_bug.cgi?id=11361 for more details and progress. - - - - - - Gets the culture info associated with this format provider. - - - - - Gets the text comparison information associated with this format provider. - - - - - Returns a read-only list of the names of the months for the default calendar for this culture. - See the usage guide for caveats around the use of these names for other calendars. - Element 0 of the list is null, to allow a more natural mapping from (say) 1 to the string "January". - - - - - Returns a read-only list of the abbreviated names of the months for the default calendar for this culture. - See the usage guide for caveats around the use of these names for other calendars. - Element 0 of the list is null, to allow a more natural mapping from (say) 1 to the string "Jan". - - - - - Returns a read-only list of the names of the months for the default calendar for this culture. - See the usage guide for caveats around the use of these names for other calendars. - Element 0 of the list is null, to allow a more natural mapping from (say) 1 to the string "January". - The genitive form is used for month text where the day of month also appears in the pattern. - If the culture does not use genitive month names, this property will return the same reference as - . - - - - - Returns a read-only list of the abbreviated names of the months for the default calendar for this culture. - See the usage guide for caveats around the use of these names for other calendars. - Element 0 of the list is null, to allow a more natural mapping from (say) 1 to the string "Jan". - The genitive form is used for month text where the day also appears in the pattern. - If the culture does not use genitive month names, this property will return the same reference as - . - - - - - Returns a read-only list of the names of the days of the week for the default calendar for this culture. - See the usage guide for caveats around the use of these names for other calendars. - Element 0 of the list is null, and the other elements correspond with the index values returned from - and similar properties. - - - - - Returns a read-only list of the abbreviated names of the days of the week for the default calendar for this culture. - See the usage guide for caveats around the use of these names for other calendars. - Element 0 of the list is null, and the other elements correspond with the index values returned from - and similar properties. - - - - - Gets the number format associated with this formatting information. - - - - - Gets the BCL date time format associated with this formatting information. - - - - - Gets the positive sign. - - - - - Gets the negative sign. - - - - - Gets the time separator. - - - - - Gets the date separator. - - - - - Gets the AM designator. - - - - - Gets the PM designator. - - - - - Returns the names for the given era in this culture. - - The era to find the names of. - A read-only list of names for the given era, or an empty list if - the era is not known in this culture. - - - - Returns the primary name for the given era in this culture. - - The era to find the primary name of. - The primary name for the given era, or an empty string if the era name is not known. - - - - Gets the object for the current thread. - - - - - Gets the "F" pattern. - - - - - Gets the "L" pattern. - - - - - Gets the "M" pattern. - - - - - Gets the "S" pattern. - - - - - Clears the cache. Only used for test purposes. - - - - - Gets the for the given . - - - This method maintains a cache of results for read-only cultures. - - The culture info. - The . Will never be null. - - - - Gets the for the given . If the - format provider is null or if it does not provide a - object then the format object for the current thread is returned. - - The . - The . Will never be null. - - - - Returns a that represents this instance. - - - - - The description for an era: the primary name and all possible names. - - - - - A local date and time in a particular calendar system, combined with an offset from UTC. This is - broadly similar to in the BCL. - - - - A value of this type unambiguously represents both a local time and an instant on the timeline, - but does not have a well-defined time zone. This means you cannot reliably know what the local - time would be five minutes later, for example. While this doesn't sound terribly useful, it's very common - in text representations. - - - This type is an immutable value type. See the thread safety section of the user guide for more information. - - - - Constructs a new offset date/time with the given local date and time, and the given offset from UTC. - - Local date and time to represent - Offset from UTC - - - Gets the calendar system associated with this local date and time. - - - Gets the year of this offset date and time. - This returns the "absolute year", so, for the ISO calendar, - a value of 0 means 1 BC, for example. - - - Gets the month of this offset date and time within the year. - - - Gets the day of this offset date and time within the month. - - - - Gets the week day of this offset date and time expressed as an value, - for calendars which use ISO days of the week. - - The underlying calendar doesn't use ISO days of the week. - - - - - Gets the week day of this offset date and time as a number. - - - For calendars using ISO week days, this gives 1 for Monday to 7 for Sunday. - - - - - - Gets the "week year" of this offset date and time. - - - - The WeekYear is the year that matches with the field. - In the standard ISO8601 week algorithm, the first week of the year - is that in which at least 4 days are in the year. As a result of this - definition, day 1 of the first week may be in the previous year. - The WeekYear allows you to query the effective year for that day. - - - For example, January 1st 2011 was a Saturday, so only two days of that week - (Saturday and Sunday) were in 2011. Therefore January 1st is part of - week 52 of WeekYear 2010. Conversely, December 31st 2012 is a Monday, - so is part of week 1 of WeekYear 2013. - - - - - Gets the week within the WeekYear. See for more details. - - - Gets the year of this offset date and time within the century. - This always returns a value in the range 0 to 99 inclusive. - - - Gets the year of this offset date and time within the era. - - - Gets the era of this offset date and time. - - - Gets the day of this offset date and time within the year. - - - - Gets the hour of day of this offset date and time, in the range 0 to 23 inclusive. - - - - - Gets the hour of the half-day of this date and time, in the range 1 to 12 inclusive. - - - - - Gets the minute of this offset date and time, in the range 0 to 59 inclusive. - - - - - Gets the second of this offset date and time within the minute, in the range 0 to 59 inclusive. - - - - - Gets the millisecond of this offset date and time within the second, in the range 0 to 999 inclusive. - - - - - Gets the tick of this offset date and time within the second, in the range 0 to 9,999,999 inclusive. - - - - - Gets the tick of this offset date and time within the day, in the range 0 to 863,999,999,999 inclusive. - - - - - Returns the local date and time represented within this offset date and time. - - - - - Gets the local date represented by this offset date and time. The returned - will have the same calendar system and return the same values for each of the date-based calendar - properties (Year, MonthOfYear and so on), but will not have any offset information. - - - - - Gets the time portion of this offset date and time. The returned will - return the same values for each of the time-based properties (Hour, Minute and so on), but - will not have any offset information. - - - - - Returns the offset from UTC. - - - - - Converts this offset date and time to an instant in time by subtracting the offset from the local date and time. - - The instant represented by this offset date and time - - - - Returns this value as a . - - - - This method returns a with the same local date and time as this value, using a - fixed time zone with the same offset as the offset for this value. - - - Note that because the resulting ZonedDateTime has a fixed time zone, it is generally not useful to - use this result for arithmetic operations, as the zone will not adjust to account for daylight savings. - - - A zoned date/time with the same local time and a fixed time zone using the offset from this value. - - - - Returns the BCL corresponding to this offset date and time. - - A DateTimeOffset with the same local date/time and offset as this. The part of - the result always has a "kind" of Unspecified. - - - - Builds an from a BCL by converting - the part to a , and the offset part to an . - - DateTimeOffset to convert - The converted offset date and time - - - - Creates a new OffsetDateTime representing the same physical date, time and offset, but in a different calendar. - The returned OffsetDateTime is likely to have different date field values to this one. - For example, January 1st 1970 in the Gregorian calendar was December 19th 1969 in the Julian calendar. - - The calendar system to convert this local date to. - The converted OffsetDateTime. - - - - Creates a new OffsetDateTime representing the instant in time in the same calendar, - but with a different offset. The local date and time is adjusted accordingly. - - The new offset to use. - The converted OffsetDateTime. - - - - Returns a hash code for this local date. - - A hash code for this local date. - - - - Compares two values for equality. This requires - that the local date/time values be the same (in the same calendar) and the offsets. - - The object to compare this date with. - True if the given value is another offset date/time equal to this one; false otherwise. - - - - Compares two values for equality. This requires - that the local date/time values be the same (in the same calendar) and the offsets. - - The value to compare this offset date/time with. - True if the given value is another offset date/time equal to this one; false otherwise. - - - - Returns a that represents this instance. - - - The value of the current instance in the default format pattern ("G"), using the current thread's - culture to obtain a format provider. - - - - - Formats the value of the current instance using the specified pattern. - - - A containing the value of the current instance in the specified format. - - The specifying the pattern to use, - or null to use the default format pattern ("G"). - - The to use when formatting the value, - or null to use the current thread's culture to obtain a format provider. - - 2 - - - - Implements the operator == (equality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are equal to each other, otherwise false. - - - - Implements the operator != (inequality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are not equal to each other, otherwise false. - - - - Base class for comparers. - - - Use the static properties of this class to obtain instances. - For the curious: this class only exists so that in the future, it can expose more functionality - probably - implementing . If we simply provided properties on OffsetDateTime of type - we'd have no backward-compatible way of adding to the set of implemented interfaces. - - - - - Returns a comparer which compares values by their local date/time, without reference to - either the offset or the calendar system. - - - For example, this comparer considers 2013-03-04T20:21:00+0100 to be later than 2013-03-04T19:21:00-0700 even though - the second value represents a later instant in time. - This property will return a reference to the same instance every time it is called. - - - - - Returns a comparer which compares values by the instant values obtained by applying the offset to - the local date/time, ignoring the calendar system. - - - For example, this comparer considers 2013-03-04T20:21:00+0100 to be earlier than 2013-03-04T19:21:00-0700 even though - the second value has a local time which is earlier. - This property will return a reference to the same instance every time it is called. - - - - - Internal constructor to prevent external classes from deriving from this. - (That means we can add more abstract members in the future.) - - - - - Compares two values and returns a value indicating whether one is less than, equal to, or greater than the other. - - The first value to compare. - The second value to compare. - A signed integer that indicates the relative values of and , as shown in the following table. - - - Value - Meaning - - - Less than zero - is less than . - - - Zero - is equals to . - - - Greater than zero - is greater than . - - - - - - - Implementation for - - - - - - - - Implementation for . - - - - - - - - - - - - - - - - - Provides stable, performant time zone data. - - - Consumers should be able to treat an like a cache: - lookups should be quick (after at most one lookup of a given ID), and the data for a given ID should always be - the same (even if the specific instance returned is not). - Consumers should not feel the need to cache data accessed through this interface. - Implementations designed to work with any implementation (such as - ) should not attempt to handle exceptions thrown by the source. A source-specific - provider may do so, as it has more detailed knowledge of what can go wrong and how it can best be handled. - - - - - The version ID of this provider. - - - - - Gets the list of valid time zone ids advertised by this provider. - - - - This list will be sorted in ordinal lexicographic order. It cannot be modified by callers, and - must not be modified by the provider either: client code can safely treat it as thread-safe - and deeply immutable. - - - In addition to the list returned here, providers always support the fixed-offset timezones with IDs "UTC" - and "UTC+/-Offset". These may or may not be included explicitly in this list. - - - The of string ids. - - - - Gets the time zone from this provider that matches the system default time zone, if a matching time zone is - available. - - - - Callers should be aware that this method will throw if no matching - time zone is found. For the built-in Noda Time providers, this is unlikely to occur in practice (assuming - the system is using a standard Windows time zone), but can occur even then, if no mapping is found. The TZDB - source contains mappings for almost all Windows system time zones, but a few (such as "Mid-Atlantic Standard Time") - are unmappable. - - - The system default time zone is not mapped by - this provider. - - The provider-specific representation of the system default time zone. - - - - - Returns the time zone for the given ID, if it's available. - - - - Note that this may return a that has a different ID to that requested, if the ID - provided is an alias. - - - Note also that this method is not required to return the same instance for - successive requests for the same ID; however, all instances returned for a given ID must compare - as equal. - - - The fixed-offset timezones with IDs "UTC" and "UTC+/-Offset" are always available. These must - return instances that are equal to those returned by . - - - The time zone ID to find. - The for the given ID or null if the provider does not support - the given ID. - - - - Returns the time zone for the given ID. - - - - Unlike , this indexer will never return a null reference. If the ID is not - supported by this provider, it will throw . - - - Note that this may return a that has a different ID to that requested, if the ID - provided is an alias. - - - Note also that this method is not required to return the same instance for - successive requests for the same ID; however, all instances returned for a given ID must compare - as equal. - - - The fixed-offset timezones with IDs "UTC" and "UTC+/-Offset" are always available. These must - return instances that are equal to those returned by . - - - The time zone id to find. - The for the given ID. - This provider does not support the given ID. - - - - A mutable builder class for values. Each property can - be set independently, and then a Period can be created from the result - using the method. - - - This type is not thread-safe without extra synchronization, but has no - thread affinity. - - - - - Gets or sets the number of years within the period. - - - - - Gets or sets the number of months within the period. - - - - - Gets or sets the number of weeks within the period. - - - - - Gets or sets the number of days within the period. - - - - - Gets or sets the number of hours within the period. - - - - - Gets or sets the number of minutes within the period. - - - - - Gets or sets the number of seconds within the period. - - - - - Gets or sets the number of milliseconds within the period. - - - - - Gets or sets the number of ticks within the period. - - - - - Creates a new period builder with an initially zero period. - - - - - Creates a new period builder with the values from an existing - period. Calling this constructor instead of - allows object initializers to be used. - - An existing period to copy values from. - - - - Gets or sets the value of a single unit. - - A single value within the enumeration. - The value of the given unit within this period builder, or zero if the unit is unset. - is not a single unit. - - - - Builds a period from the properties in this builder. - - A period containing the values from this builder. - - - - - - - - - - - - - The units within a . When a period is created to find the difference between two local values, - the caller may specify which units are required - for example, you can ask for the difference between two dates - in "years and weeks". Units are always applied largest-first in arithmetic. - - - - - Value indicating no units - an empty period. - - - - - Years element within a - - - - - Months element within a - - - - - Weeks element within a - - - - - Days element within a - - - - - Compound value representing the combination of , , and . - - - - - Compound value representing the combination of , and . - - - - - Hours element within a - - - - - Minutes element within a - - - - - Seconds element within a - - - - - Milliseconds element within a - - - - - Tick element within a - - - - - Compound value representing the combination of , and . - - - - - Compound value representing the combination of all time elements. - - - - - Compound value representing the combination of all possible elements except weeks. - - - - - Compound value representing the combination of all possible elements. - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to A.H.|AH. - - - - - Looks up a localized string similar to A.M.|AM. - - - - - Looks up a localized string similar to A.M.|AM. - - - - - Looks up a localized string similar to A.P.|AP. - - - - - Looks up a localized string similar to B.C.|B.C.E.|BC|BCE. - - - - - Looks up a localized string similar to A.D.|AD|C.E.|CE. - - - - - Looks up a localized string similar to +HH:mm:ss.fff. - - - - - Looks up a localized string similar to +HH:mm:ss. - - - - - Looks up a localized string similar to +HH:mm. - - - - - Looks up a localized string similar to +HH. - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to Format string is missing a close quote: {0}. - - - - - Looks up a localized string similar to Format error.. - - - - - Looks up a localized string similar to Argument cannot be null.. - - - - - Looks up a localized string similar to Cannot change a read only object.. - - - - - Looks up a localized string similar to The string cannot be empty.. - - - - - Looks up a localized string similar to The string cannot be empty or only contain white space.. - - - - - Looks up a localized string similar to The local date/time is ambiguous in the target time zone.. - - - - - Looks up a localized string similar to The era specifier cannot be specified in the same pattern as the calendar specifier.. - - - - - Looks up a localized string similar to The value "{0}" cannot be parsed into an instance of {1} using pattern "{2}". - - - - - Looks up a localized string similar to The value string does not match a date separator in the format string.. - - - - - Looks up a localized string similar to The day {0} is out of range in month {1} of year {2}.. - - - - - Looks up a localized string similar to The pattern flag '{0}' cannot appear twice and parse different values.. - - - - - Looks up a localized string similar to The list of formats cannot be empty.. - - - - - Looks up a localized string similar to The specified period was empty.. - - - - - Looks up a localized string similar to The Z prefix for an Offset pattern must be followed by a custom pattern.. - - - - - Looks up a localized string similar to Input string ended unexpectedly early.. - - - - - Looks up a localized string similar to The era specifier cannot be used without the "year of era" specifier.. - - - - - Looks up a localized string similar to The format string has an escape character (backslash '\') at the end of the string.. - - - - - Looks up a localized string similar to The value string does not match an escaped character in the format string: "\{0}". - - - - - Looks up a localized string similar to Expected end of input, but more data remains.. - - - - - Looks up a localized string similar to The format matches a prefix of the value string but not the entire string. Part not matching: "{0}".. - - - - - Looks up a localized string similar to The value {0} is out of range for the field '{1}' in the {2} type.. - - - - - Looks up a localized string similar to The items of the format string array cannot be null or empty.. - - - - - Looks up a localized string similar to The format string is invalid: "{0}". - - - - - Looks up a localized string similar to This pattern is only capable of formatting, not parsing.. - - - - - Looks up a localized string similar to The format string is empty.. - - - - - Looks up a localized string similar to The 'h' pattern flag (12 hour format) is not supported by the {0} type.. - - - - - Looks up a localized string similar to The specified day of the week does not matched the computed value.. - - - - - Looks up a localized string similar to The month values specified as text and numbers are inconsistent.. - - - - - Looks up a localized string similar to The individual values for the fields '{0}' and '{1}' created an inconsistency in the {2} type.. - - - - - Looks up a localized string similar to 24 is only valid as an hour number when the units smaller than hours are all 0.. - - - - - Looks up a localized string similar to The specified offset is invalid for the given date/time.. - - - - - Looks up a localized string similar to The period unit specifier '{0}' is invalid.. - - - - - Looks up a localized string similar to The value string does not match a simple character in the format string "{0}".. - - - - - Looks up a localized string similar to The value string does not match the required number from the format string "{0}".. - - - - - Looks up a localized string similar to The value string does not match the text-based field '{0}'.. - - - - - Looks up a localized string similar to The period unit specifier '{0}' appears at the wrong place in the input string.. - - - - - Looks up a localized string similar to The value string does not match the AM or PM designator for the culture at the required place.. - - - - - Looks up a localized string similar to The pattern has an embedded pattern which is missing its closing character ('{0}').. - - - - - Looks up a localized string similar to The pattern has an embedded pattern which is missing its opening character ('{0}').. - - - - - Looks up a localized string similar to The format string is missing the end quote character "{0}".. - - - - - Looks up a localized string similar to The value string does not include a number in the expected position.. - - - - - Looks up a localized string similar to The required value sign is missing.. - - - - - Looks up a localized string similar to The month {0} is out of range in year {1}.. - - - - - Looks up a localized string similar to Only one of "D", "H", "M" or "S" can occur in a duration format string.. - - - - - Looks up a localized string similar to The specified calendar id is not recognized.. - - - - - Looks up a localized string similar to None of the specified formats matches the given value string.. - - - - - Looks up a localized string similar to The specified time zone identifier is not recognized.. - - - - - Looks up a localized string similar to A percent sign (%) appears at the end of the format string.. - - - - - Looks up a localized string similar to A percent sign (%) is followed by another percent sign in the format string.. - - - - - Looks up a localized string similar to A positive value sign is not valid at this point.. - - - - - Looks up a localized string similar to The standard format "{0}" for type {1} does not support a precision.. - - - - - Looks up a localized string similar to The value string does not match a quoted string in the pattern.. - - - - - Looks up a localized string similar to There were more consecutive copies of the pattern character "{0}" than the maximum allowed ({1}) in the format string.. - - - - - Looks up a localized string similar to There were fewer consecutive copies of the pattern character "{0}" than the minimum allowed ({1}) in the format string.. - - - - - Looks up a localized string similar to The field "{0}" is specified multiple times in the pattern.. - - - - - Looks up a localized string similar to The period unit specifier '{0}' appears multiple times in the input string.. - - - - - Looks up a localized string similar to The local date/time is skipped in the target time zone.. - - - - - Looks up a localized string similar to The value string does not match a time separator in the format string.. - - - - - Looks up a localized string similar to More characters were expected in the parsable string [{0}].. - - - - - Looks up a localized string similar to The value string includes a negative value where only a non-negative one is allowed.. - - - - - Looks up a localized string similar to Internal Error: The specified ParseFailureKind is unknown [{0}].. - - - - - Looks up a localized string similar to The standard format "{0}" is not valid for the {1} type.. - - - - - Looks up a localized string similar to {0} Value being parsed: '{1}'. (^ indicates error position.). - - - - - Looks up a localized string similar to {0} Value being parsed: '{1}'.. - - - - - Looks up a localized string similar to The value {0} is out of the legal range for the {1} type.. - - - - - Looks up a localized string similar to The value string is empty.. - - - - - Looks up a localized string similar to The year {0} is out of range for the {1} era in the {2} calendar.. - - - - - Looks up a localized string similar to The Z prefix for an Offset pattern must occur at the beginning of the pattern.. - - - - - Just a static class to house the public key, which allows us to avoid repeating it all over the place. - - - - - Represents a pattern for parsing and formatting values. - - - When used with a read-only , this type is immutable and instances - may be shared freely between threads. We recommend only using read-only cultures for patterns, although this is - not currently enforced. - - - - - General pattern for durations using the invariant culture, with a format string of "-D:hh:mm:ss.FFFFFFF". - This pattern round-trips. - - - - - Returns the pattern text for this pattern, as supplied on creation. - - - - - Returns the localization information used in this pattern. - - - - - Parses the given text value according to the rules of this pattern. - - - This method never throws an exception (barring a bug in Noda Time itself). Even errors such as - the argument being null are wrapped in a parse result. - - The text value to parse. - The result of parsing, which may be successful or unsuccessful. - - - - Formats the given duration as text according to the rules of this pattern. - - The duration to format. - The duration formatted according to this pattern. - - - - Creates a pattern for the given pattern text and format info. - - Pattern text to create the pattern for - Localization information - A pattern for parsing and formatting offsets. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text and culture. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - The culture to use in the pattern - A pattern for parsing and formatting offsets. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the current thread's current culture. - - - See the user guide for the available pattern text options. Note that the current culture - is captured at the time this method is called - it is not captured at the point of parsing - or formatting values. - - Pattern text to create the pattern for - A pattern for parsing and formatting offsets. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the invariant culture. - - - See the user guide for the available pattern text options. Note that the current culture - is captured at the time this method is called - it is not captured at the point of parsing - or formatting values. - - Pattern text to create the pattern for - A pattern for parsing and formatting offsets. - The pattern text was invalid. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - culture. - - The culture to use in the new pattern. - A new pattern with the given culture. - - - - Returns the absolute number of ticks in a duration, as a ulong in order to handle long.MinValue sensibly. - - - - - Provides a container for the interim parsed pieces of an value. - - - - - Calculates the value from the parsed pieces. - - - - - Represents a pattern for parsing and formatting values. - - - When used with a read-only , this type is immutable and instances - may be shared freely between threads. We recommend only using read-only cultures for patterns, although this is - not currently enforced. - - - - - Returns an invariant offset date/time pattern based on ISO-8601 (down to the second), including offset from UTC. - The calendar system is not parsed or formatted as part of this pattern. It corresponds to a custom pattern of - "yyyy'-'MM'-'dd'T'HH':'mm':'sso<G>". This pattern is available as the "G" - standard pattern (even though it is invariant). - - - - - Returns an invariant offset date/time pattern based on ISO-8601 (down to the tick), including offset from UTC. - The calendar system is not parsed or formatted as part of this pattern. It corresponds to a custom pattern of - "yyyy'-'MM'-'dd'T'HH':'mm':'ss;FFFFFFFo<G>". This will round-trip any values - in the ISO calendar, and is available as the "o" standard pattern. - - - - - Returns an invariant offset date/time pattern based on RFC 3339 (down to the tick), including offset from UTC - as hours and minutes only. The minutes part of the offset is always included, but any sub-minute component - of the offset is lost. An offset of zero is formatted as 'Z', but all of 'Z', '+00:00' and '-00:00' are parsed - the same way. The RFC 3339 meaning of '-00:00' is not supported by Noda Time. - Note that parsing is case-sensitive (so 'T' and 'Z' must be upper case). - The calendar system is not parsed or formatted as part of this pattern. It corresponds to a custom pattern of - "yyyy'-'MM'-'dd'T'HH':'mm':'ss;FFFFFFFo<Z+HH:mm>". - - - - - Returns an invariant offset date/time pattern based on ISO-8601 (down to the tick) - including offset from UTC and calendar ID. It corresponds to a custom pattern of - "yyyy'-'MM'-'dd'T'HH':'mm':'ss;FFFFFFFo<G> '('c')'". This will round-trip any value in any calendar, - and is available as the "r" standard pattern. - - - - - Class whose existence is solely to avoid type initialization order issues, most of which stem - from needing NodaFormatInfo.InvariantInfo... - - - - - Returns the pattern text for this pattern, as supplied on creation. - - - - - Returns the localization information used in this pattern. - - - - - Returns the value used as a template for parsing: any field values unspecified - in the pattern are taken from the template. - - - - - Parses the given text value according to the rules of this pattern. - - - This method never throws an exception (barring a bug in Noda Time itself). Even errors such as - the argument being null are wrapped in a parse result. - - The text value to parse. - The result of parsing, which may be successful or unsuccessful. - - - - Formats the given zoned date/time as text according to the rules of this pattern. - - The zoned date/time to format. - The zoned date/time formatted according to this pattern. - - - - Creates a pattern for the given pattern text, format info, and template value. - - Pattern text to create the pattern for - The format info to use in the pattern - Template value to use for unspecified fields - A pattern for parsing and formatting zoned date/times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text, culture, and template value. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - The culture to use in the pattern - Template value to use for unspecified fields - A pattern for parsing and formatting local date/times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the invariant culture, using the default - template value of midnight January 1st 2000 at an offset of 0. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - A pattern for parsing and formatting local date/times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the current culture, using the default - template value of midnight January 1st 2000 at an offset of 0. - - - See the user guide for the available pattern text options. Note that the current culture - is captured at the time this method is called - it is not captured at the point of parsing - or formatting values. - - Pattern text to create the pattern for - A pattern for parsing and formatting local date/times. - The pattern text was invalid. - - - - Creates a pattern for the same original localization information as this pattern, but with the specified - pattern text. - - The pattern text to use in the new pattern. - A new pattern with the given pattern text. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - localization information. - - The localization information to use in the new pattern. - A new pattern with the given localization information. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - culture. - - The culture to use in the new pattern. - A new pattern with the given culture. - - - - Creates a pattern for the same original pattern text and culture as this pattern, but with - the specified template value. - - The template value to use in the new pattern. - A new pattern with the given template value. - - - - Internal interface supporting partial parsing and formatting. This is used - when one pattern is embedded within another. - - The type of value to be parsed or formatted. - - - - Parses a value from the current position in the cursor. This will - not fail if the pattern ends before the cursor does - that's expected - in most cases. - - The cursor to parse from. - The result of parsing from the cursor. - - - - Formats the given value by appending to an existing StringBuilder. - - The value to format. - The builder to append to. - - - - Represents a pattern for parsing and formatting values. - - - When used with a read-only , this type is immutable and instances - may be shared freely between threads. We recommend only using read-only cultures for patterns, although this is - not currently enforced. - - - - - Returns an zoned local date/time pattern based on ISO-8601 (down to the second) including offset from UTC and zone ID. - It corresponds to a custom pattern of "yyyy'-'MM'-'dd'T'HH':'mm':'ss z '('o<g>')'" and is available - as the 'G' standard pattern. - - - The calendar system is not formatted as part of this pattern, and it cannot be used for parsing as no time zone - provider is included. Call on the value of this property to obtain a - pattern which can be used for parsing. - - - - - Returns an invariant zoned date/time pattern based on ISO-8601 (down to the tick) including offset from UTC and zone ID. - It corresponds to a custom pattern of "yyyy'-'MM'-'dd'T'HH':'mm':'ss;FFFFFFF z '('o<g>')'" and is available - as the 'F' standard pattern. - - - The calendar system is not formatted as part of this pattern, and it cannot be used for parsing as no time zone - provider is included. Call on the value of this property to obtain a - pattern which can be used for parsing. - - - - - Class whose existence is solely to avoid type initialization order issues, most of which stem - from needing NodaFormatInfo.InvariantInfo... - - - - - Returns the pattern text for this pattern, as supplied on creation. - - - - - Returns the localization information used in this pattern. - - - - - Returns the value used as a template for parsing: any field values unspecified - in the pattern are taken from the template. - - - - - Returns the resolver which is used to map local date/times to zoned date/times, - handling skipped and ambiguous times appropriately (where the offset isn't specified in the pattern). - - - - - Returns the provider which is used to look up time zones when parsing a pattern - which contains a time zone identifier. This may be null, in which case the pattern can - only be used for formatting (not parsing). - - - - - Parses the given text value according to the rules of this pattern. - - - This method never throws an exception (barring a bug in Noda Time itself). Even errors such as - the argument being null are wrapped in a parse result. - - The text value to parse. - The result of parsing, which may be successful or unsuccessful. - - - - Formats the given zoned date/time as text according to the rules of this pattern. - - The zoned date/time to format. - The zoned date/time formatted according to this pattern. - - - - Creates a pattern for the given pattern text, format info, template value, mapping resolver and time zone provider. - - Pattern text to create the pattern for - The format info to use in the pattern - Template value to use for unspecified fields - Resolver to apply when mapping local date/time values into the zone. - Time zone provider, used when parsing text which contains a time zone identifier. - A pattern for parsing and formatting zoned date/times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text, culture, resolver, time zone provider, and template value. - - - See the user guide for the available pattern text options. - If is null, the resulting pattern can be used for formatting - but not parsing. - - Pattern text to create the pattern for - The culture to use in the pattern - Resolver to apply when mapping local date/time values into the zone. - Time zone provider, used when parsing text which contains a time zone identifier. - Template value to use for unspecified fields - A pattern for parsing and formatting zoned date/times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text and time zone provider, using a strict resolver, the invariant - culture, and a default template value of midnight January 1st 2000 UTC. - - - The resolver is only used if the pattern text doesn't include an offset. - If is null, the resulting pattern can be used for formatting - but not parsing. - - Pattern text to create the pattern for - Time zone provider, used when parsing text which contains a time zone identifier. - A pattern for parsing and formatting zoned date/times. - - - - Creates a pattern for the given pattern text and time zone provider, using a strict resolver, the current - culture, and a default template value of midnight January 1st 2000 UTC. - - - The resolver is only used if the pattern text doesn't include an offset. - If is null, the resulting pattern can be used for formatting - but not parsing. Note that the current culture is captured at the time this method is called - - it is not captured at the point of parsing or formatting values. - - Pattern text to create the pattern for - Time zone provider, used when parsing text which contains a time zone identifier. - A pattern for parsing and formatting zoned date/times. - - - - Creates a pattern for the same original localization information as this pattern, but with the specified - pattern text. - - The pattern text to use in the new pattern. - A new pattern with the given pattern text. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - localization information. - - The localization information to use in the new pattern. - A new pattern with the given localization information. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - culture. - - The culture to use in the new pattern. - A new pattern with the given culture. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - resolver. - - The new local mapping resolver to use. - A new pattern with the given resolver. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - time zone provider. - - - If is null, the resulting pattern can be used for formatting - but not parsing. - - The new time zone provider to use. - A new pattern with the given time zone provider. - - - - Creates a pattern like this one, but with the specified template value. - - The template value for the new pattern, used to fill in unspecified fields. - A new pattern with the given template value. - - - - Parser for patterns of values. - - - - - Combines the values in a date bucket with the values in a time bucket. - - - This would normally be the method, but we want - to be able to use the same logic when parsing an - and . - - - - - A pattern parser for a single format info, which caches patterns by text/style. - - - - - Provides helper methods for formatting values using pattern strings. - - - - - The maximum number of characters allowed for padded values. - - - - - Maximum number of digits in a (positive) long. - - - - - Formats the given value left padded with zeros. - - - Left pads with zeros the value into a field of characters. If the value - is longer than , the entire value is formatted. If the value is negative, - it is preceded by "-" but this does not count against the length. - - The value to format. - The length to fill. - The output buffer to add the digits to. - if too many characters are requested. . - - - - Formats the given value, which is an integer representation of a fraction. - Note: current usage means this never has to cope with negative numbers. - - - AppendFraction(1200, 4, 5, builder) will result in "0120" being - appended to the builder. The value is treated as effectively 0.01200 because - the scale is 5, but only 4 digits are formatted. - - The value to format. - The length to fill. Must be at most . - The scale of the value i.e. the number of significant digits is the range of the value. Must be in the range [1, 7]. - The output buffer to add the digits to. - - - - Formats the given value, which is an integer representation of a fraction, - truncating any right-most zero digits. - If the entire value is truncated then the preceeding decimal separater is also removed. - Note: current usage means this never has to cope with negative numbers. - - - AppendFractionTruncate(1200, 4, 5, builder) will result in "001" being - appended to the builder. The value is treated as effectively 0.01200 because - the scale is 5; only 4 digits are formatted (leaving "0120") and then the rightmost - 0 digit is truncated. - - The value to format. - The length to fill. Must be at most . - The scale of the value i.e. the number of significant digits is the range of the value. Must be in the range [1, 7]. - The output buffer to add the digits to. - - - - Formats the given value using the invariant culture, with no truncation or padding. - - The value to format. - The output buffer to add the digits to. - - - - Represents a pattern for parsing and formatting values. - - - When used with a read-only , this type is immutable and instances - may be shared freely between threads. We recommend only using read-only cultures for patterns, although this is - not currently enforced. - - - - - Default label for when formatting. - - - - - Default label for when formatting. - - - - - Label at the start of any out-of-range value. - - - - - Returns the general pattern, which always uses an invariant culture. The general pattern represents - an instant as a UTC date/time in ISO-8601 style "yyyy-MM-ddTHH:mm:ss'Z'". - - - - - Returns an invariant instant pattern which is ISO-8601 compatible, providing up to 7 decimal places - of sub-second accuracy. (These digits are omitted when unnecessary.) - This corresponds to the text pattern "yyyy'-'MM'-'dd'T'HH':'mm':'ss;FFFFFFF'Z'". - - - - - Class whose existence is solely to avoid type initialization order issues, most of which stem - from needing NodaFormatInfo.InvariantInfo... - - - - - Returns the pattern text for this pattern, as supplied on creation. - - - - - Returns the localization information used in this pattern. - - - - - Parses the given text value according to the rules of this pattern. - - - This method never throws an exception (barring a bug in Noda Time itself). Even errors such as - the argument being null are wrapped in a parse result. - - The text value to parse. - The result of parsing, which may be successful or unsuccessful. - - - - Formats the given instant as text according to the rules of this pattern. - - The instant to format. - The instant formatted according to this pattern. - - - - Creates a pattern for the given pattern text and format info. The default - min/max labels are used. - - Pattern text to create the pattern for - The format info to use in the pattern - A pattern for parsing and formatting instants. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text and culture. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - The culture to use in the pattern - A pattern for parsing and formatting instants. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the current thread's current culture. - - - See the user guide for the available pattern text options. Note that the current culture - is captured at the time this method is called - it is not captured at the point of parsing - or formatting values. - - Pattern text to create the pattern for - A pattern for parsing and formatting instants. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the invariant culture, using the default - min/max labels. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - A pattern for parsing and formatting instants. - The pattern text was invalid. - - - - Creates a "numeric" pattern for the given culture. The numeric format gives the - number of ticks in decimal format, with or without thousands separators. - - The culture to use in the pattern - True to include thousands separators when parsing or formatting; false to omit them. - A numeric pattern for the configuration - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - localization information. - - The localization information to use in the new pattern. - A new pattern with the given localization information. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - culture. - - The culture to use in the new pattern. - A new pattern with the given culture. - - - - Creates a new pattern for the same original pattern text and culture as this pattern, but - with the given min/max labels. - - Text to use for . Must be non-empty, and not the same as . - Text to use for . Must be non-empty, and not the same as - A new pattern with the given min/max labels. - - - - - Pattern parsing support for . - - - Supported patterns: - - g: general; the UTC ISO-8601 instant in the style yyyy-MM-ddTHH:mm:ssZ - n: numeric; the number of ticks since the epoch using thousands separators - d: numeric; the number of ticks since the epoch without thousands separators - - - - - - Exception thrown to indicate that the format pattern provided for either formatting or parsing is invalid. - - Any public static members of this type are thread safe. Any instance members are not guaranteed to be thread safe. - See the thread safety section of the user guide for more information. - - - - - Creates a new InvalidPatternException with no message. - - - - - Creates a new InvalidPatternException with the given message. - - A message describing the nature of the failure - - - - Creates a new InvalidPatternException by formatting the given format string with - the specified parameters, in the current culture. - - Format string to use in order to create the final message - Format string parameters - - - - Generic interface supporting parsing and formatting. Parsing always results in a - which can represent success or failure. - - - Idiomatic text handling in Noda Time involves creating a pattern once and reusing it multiple - times, rather than specifying the pattern text repeatedly. All patterns are immutable and thread-safe, - and include the culture used for localization purposes. - - Type of value to parse or format. - - - - Parses the given text value according to the rules of this pattern. - - - This method never throws an exception (barring a bug in Noda Time itself). Even errors such as - the argument being null are wrapped in a parse result. - - The text value to parse. - The result of parsing, which may be successful or unsuccessful. - - - - Formats the given value as text according to the rules of this pattern. - - The value to format. - The value formatted according to this pattern. - - - - Represents a pattern for parsing and formatting values. - - - When used with a read-only , this type is immutable and instances - may be shared freely between threads. We recommend only using read-only cultures for patterns, although this is - not currently enforced. - - - - - Returns an invariant local date pattern which is ISO-8601 compatible. - This corresponds to the text pattern "yyyy'-'MM'-'dd". - - - - - Class whose existence is solely to avoid type initialization order issues, most of which stem - from needing NodaFormatInfo.InvariantInfo... - - - - - Returns the pattern text for this pattern, as supplied on creation. - - - - - Returns the localization information used in this pattern. - - - - - Returns the value used as a template for parsing: any field values unspecified - in the pattern are taken from the template. - - - - - Parses the given text value according to the rules of this pattern. - - - This method never throws an exception (barring a bug in Noda Time itself). Even errors such as - the argument being null are wrapped in a parse result. - - The text value to parse. - The result of parsing, which may be successful or unsuccessful. - - - - Formats the given local date as text according to the rules of this pattern. - - The local date to format. - The local date formatted according to this pattern. - - - - Creates a pattern for the given pattern text, format info, and template value. - - Pattern text to create the pattern for - The format info to use in the pattern - Template value to use for unspecified fields - A pattern for parsing and formatting local dates. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text, culture, and template value. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - The culture to use in the pattern - Template value to use for unspecified fields - A pattern for parsing and formatting local dates. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text and culture, with a template value of 2000-01-01. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - The culture to use in the pattern - A pattern for parsing and formatting local dates. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the current thread's current culture. - - - See the user guide for the available pattern text options. Note that the current culture - is captured at the time this method is called - it is not captured at the point of parsing - or formatting values. - - Pattern text to create the pattern for - A pattern for parsing and formatting local dates. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the invariant culture. - - - See the user guide for the available pattern text options. Note that the current culture - is captured at the time this method is called - it is not captured at the point of parsing - or formatting values. - - Pattern text to create the pattern for - A pattern for parsing and formatting local dates. - The pattern text was invalid. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - localization information. - - The localization information to use in the new pattern. - A new pattern with the given localization information. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - culture. - - The culture to use in the new pattern. - A new pattern with the given culture. - - - - Creates a pattern like this one, but with the specified template value. - - The template value for the new pattern, used to fill in unspecified fields. - A new pattern with the given template value. - - - - Represents a pattern for parsing and formatting values. - - - When used with a read-only , this type is immutable and instances - may be shared freely between threads. We recommend only using read-only cultures for patterns, although this is - not currently enforced. - - - - - Returns an invariant local date/time pattern which is ISO-8601 compatible, down to the second. - This corresponds to the text pattern "yyyy'-'MM'-'dd'T'HH':'mm':'ss", and is also used as the "sortable" - standard pattern. - - - - - Returns an invariant local date/time pattern which is ISO-8601 compatible, providing up to 7 decimal places - of sub-second accuracy. (These digits are omitted when unnecessary.) - This corresponds to the text pattern "yyyy'-'MM'-'dd'T'HH':'mm':'ss;FFFFFFF". - - - - - Returns an invariant local date/time pattern which is ISO-8601 compatible, providing up to 7 decimal places - of sub-second accuracy which are always present (including trailing zeroes). This is compatible with the - BCL round-trip formatting of values with a kind of "unspecified". - This corresponds to the text pattern "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffff". - - - - - Returns an invariant local date/time pattern which round trips values including the calendar system. - This corresponds to the text pattern "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffff '('c')'". - - - - - Class whose existence is solely to avoid type initialization order issues, most of which stem - from needing NodaFormatInfo.InvariantInfo... - - - - - Returns the pattern text for this pattern, as supplied on creation. - - - - - Returns the localization information used in this pattern. - - - - - Returns the value used as a template for parsing: any field values unspecified - in the pattern are taken from the template. - - - - - Parses the given text value according to the rules of this pattern. - - - This method never throws an exception (barring a bug in Noda Time itself). Even errors such as - the argument being null are wrapped in a parse result. - - The text value to parse. - The result of parsing, which may be successful or unsuccessful. - - - - Formats the given local date/time as text according to the rules of this pattern. - - The local date/time to format. - The local date/time formatted according to this pattern. - - - - Creates a pattern for the given pattern text, format info, and template value. - - Pattern text to create the pattern for - The format info to use in the pattern - Template value to use for unspecified fields - A pattern for parsing and formatting local date/times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text, culture, and template value. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - The culture to use in the pattern - Template value to use for unspecified fields - A pattern for parsing and formatting local date/times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text and culture, with a template value of midnight on 2000-01-01. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - The culture to use in the pattern - A pattern for parsing and formatting local date/times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the current thread's current culture. - - - See the user guide for the available pattern text options. Note that the current culture - is captured at the time this method is called - it is not captured at the point of parsing - or formatting values. - - Pattern text to create the pattern for - A pattern for parsing and formatting local date/times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the invariant culture. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - A pattern for parsing and formatting local date/times. - The pattern text was invalid. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - localization information. - - The localization information to use in the new pattern. - A new pattern with the given localization information. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - culture. - - The culture to use in the new pattern. - A new pattern with the given culture. - - - - Creates a pattern like this one, but with the specified template value. - - The template value for the new pattern, used to fill in unspecified fields. - A new pattern with the given template value. - - - - Parser for patterns of values. - - - - - Maximum two-digit-year in the template to treat as the current century. - (One day we may want to make this configurable, but it feels very low - priority.) - - - - - Bucket to put parsed values in, ready for later result calculation. This type is also used - by LocalDateTimePattern to store and calculate values. - - - - - Represents a pattern for parsing and formatting values. - - - When used with a read-only , this type is immutable and instances - may be shared freely between threads. We recommend only using read-only cultures for patterns, although this is - not currently enforced. - - - - - Returns an invariant local time pattern which is ISO-8601 compatible, providing up to 7 decimal places. - (These digits are omitted when unnecessary.) - This corresponds to the text pattern "HH':'mm':'ss;FFFFFFF". - - - - - Class whose existence is solely to avoid type initialization order issues, most of which stem - from needing NodaFormatInfo.InvariantInfo... - - - - - Returns the pattern text for this pattern, as supplied on creation. - - - - - Returns the localization information used in this pattern. - - - - - Returns the value used as a template for parsing: any field values unspecified - in the pattern are taken from the template. - - - - - Parses the given text value according to the rules of this pattern. - - - This method never throws an exception (barring a bug in Noda Time itself). Even errors such as - the argument being null are wrapped in a parse result. - - The text value to parse. - The result of parsing, which may be successful or unsuccessful. - - - - Formats the given local time as text according to the rules of this pattern. - - The local time to format. - The local time formatted according to this pattern. - - - - Creates a pattern for the given pattern text, format info, and template value. - - Pattern text to create the pattern for - The format info to use in the pattern - Template value to use for unspecified fields - A pattern for parsing and formatting local times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text, culture, and template value. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - The culture to use in the pattern - Template value to use for unspecified fields - A pattern for parsing and formatting local times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text and culture, with a template value of midnight. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - The culture to use in the pattern - A pattern for parsing and formatting local times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the current thread's current culture. - - - See the user guide for the available pattern text options. Note that the current culture - is captured at the time this method is called - it is not captured at the point of parsing - or formatting values. - - Pattern text to create the pattern for - A pattern for parsing and formatting local times. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the invariant culture. - - - See the user guide for the available pattern text options. Note that the current culture - is captured at the time this method is called - it is not captured at the point of parsing - or formatting values. - - Pattern text to create the pattern for - A pattern for parsing and formatting local times. - The pattern text was invalid. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - localization information. - - The localization information to use in the new pattern. - A new pattern with the given localization information. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - culture. - - The culture to use in the new pattern. - A new pattern with the given culture. - - - - Creates a pattern like this one, but with the specified template value. - - The template value for the new pattern, used to fill in unspecified fields. - A new pattern with the given template value. - - - - Pattern parser for values. - - - - - Bucket to put parsed values in, ready for later result calculation. This type is also used - by LocalDateTimePattern to store and calculate values. - - - - - The fractions of a second in ticks, in the range [0, 9999999] - - - - - The hours in the range [0, 23]. - - - - - The hours in the range [1, 12]. - - - - - The minutes in the range [0, 59]. - - - - - The seconds in the range [0, 59]. - - - - - AM (0) or PM (1) - or "take from the template" (2). The latter is used in situations - where we're parsing but there is no AM or PM designator. - - - - - Calculates the value from the parsed pieces. - - - - - - The NodaTime.Text namespace contains types related to formatting and parsing date and time - values to and from text. Each core Noda Time type has its own "pattern" class to create a more - object-oriented (and efficient) approach to text handling than the one taken to the BCL. - See the user guide for more information. - - - - - - Represents a pattern for parsing and formatting values. - - - When used with a read-only , this type is immutable and instances - may be shared freely between threads. We recommend only using read-only cultures for patterns, although this is - not currently enforced. - - - - - The "general" offset pattern (e.g. +HH, +HH:mm, +HH:mm:ss, +HH:mm:ss.fff) for the invariant culture. - - - - - The "general" offset pattern (e.g. +HH, +HH:mm, +HH:mm:ss, +HH:mm:ss.fff) for the invariant culture, - but producing (and allowing) Z as a value for a zero offset. - - - - - Returns the pattern text for this pattern, as supplied on creation. - - - - - Returns the localization information used in this pattern. - - - - - Returns the pattern that this object delegates to. Mostly useful to avoid this public class - implementing an internal interface. - - - - - Parses the given text value according to the rules of this pattern. - - - This method never throws an exception (barring a bug in Noda Time itself). Even errors such as - the argument being null are wrapped in a parse result. - - The text value to parse. - The result of parsing, which may be successful or unsuccessful. - - - - Formats the given offset as text according to the rules of this pattern. - - The offset to format. - The offset formatted according to this pattern. - - - - Creates a pattern for the given pattern text and format info. - - Pattern text to create the pattern for - Localization information - A pattern for parsing and formatting offsets. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text and culture. - - - See the user guide for the available pattern text options. - - Pattern text to create the pattern for - The culture to use in the pattern - A pattern for parsing and formatting offsets. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the current thread's current culture. - - - See the user guide for the available pattern text options. Note that the current culture - is captured at the time this method is called - it is not captured at the point of parsing - or formatting values. - - Pattern text to create the pattern for - A pattern for parsing and formatting offsets. - The pattern text was invalid. - - - - Creates a pattern for the given pattern text in the invariant culture. - - - See the user guide for the available pattern text options. Note that the current culture - is captured at the time this method is called - it is not captured at the point of parsing - or formatting values. - - Pattern text to create the pattern for - A pattern for parsing and formatting offsets. - The pattern text was invalid. - - - - Creates a pattern for the same original pattern text as this pattern, but with the specified - culture. - - The culture to use in the new pattern. - A new pattern with the given culture. - - - - Pattern which optionally delegates to another, but both parses and formats Offset.Zero as "Z". - - - - - Provides a container for the interim parsed pieces of an value. - - - - - The hours in the range [0, 23]. - - - - - The minutes in the range [0, 59]. - - - - - The seconds in the range [0, 59]. - - - - - The milliseconds in the range [0, 999]. - - - - - Gets a value indicating whether this instance is negative. - - - true if this instance is negative; otherwise, false. - - - - - Calculates the value from the parsed pieces. - - - - - Abstract class to provide common facilities - - - - - Performs the first part of the parse, validating the value is non-empty before - handing over to ParseImpl for the meat of the work. - - - - - Overridden by derived classes to parse the given value, which is guaranteed to be - non-null and non-empty. It will have been trimmed appropriately if the parse style allows leading or trailing whitespace. - - - - - Common methods used when parsing dates - these are used from both LocalDateTimePatternParser - and LocalDatePatternParser. - - - - - Creates a character handler for the year specifier (y). - - - - - Returns true if the next character in the pattern might represent a digit from another value (e.g. a different - field). Returns false otherwise, e.g. if we've reached the end of the pattern, or the next character is a literal - non-digit. - - - - - Creates a character handler for the month-of-year specifier (M). - - - - - Creates a character handler for the day specifier (d). - - - - - Creates a character handler for the era specifier (g). - - - - - Creates a character handler for the calendar specifier (c). - - - - - Internal interface used by FixedFormatInfoPatternParser. Unfortunately - even though this is internal, implementations must either use public methods - or explicit interface implementation. - - - - - Extends to simplify parsing patterns such as "yyyy-MM-dd". - - - - - Gets the quoted string. - - The cursor is left positioned at the end of the quoted region. - The close quote character to match for the end of the quoted string. - The quoted string sans open and close quotes. This can be an empty string but will not be null. - - - - Gets the pattern repeat count. The cursor is left on the final character of the - repeated sequence. - - The maximum number of repetitions allowed. - The repetition count which is alway at least 1. - - - - Returns a string containing the embedded pattern within this one. - - - - The cursor is expected to be positioned before the character, - and onsuccess the cursor will be positioned on the character. - - Quote characters (' and ") and escaped characters (escaped with a backslash) are handled - but not unescaped: the resulting pattern should be ready for parsing as normal. - - The character expected to start the pattern. - The character expected to end the pattern. - The embedded pattern, not including the start/end pattern characters. - - - - Enum representing the fields available within patterns. This single enum is shared - by all parser types for simplicity, although most fields aren't used by most parsers. - Pattern fields don't necessarily have corresponding duration or date/time fields, - due to concepts such as "sign". - - - - - Class providing simple support for the various Parse/TryParse/ParseExact/TryParseExact/Format overloads - provided by individual types. - - - - - Common methods used when parsing dates - these are used from LocalDateTimePatternParser, - OffsetPatternParser and LocalTimePatternParser. - - - - - Creates a character handler for a dot (period). This is *not* culture sensitive - it is - always treated as a literal, but with the additional behaviour that if it's followed by an 'F' pattern, - that makes the period optional. - - - - - Creates a character handler for a dot (period) or comma, which have the same meaning. - Formatting always uses a dot, but parsing will allow a comma instead, to conform with - ISO-8601. This is *not* culture sensitive. - - - - - Creates a character handler to handle the "fraction of a second" specifier (f or F). - - - - - Composite pattern which parses by trying several parse patterns in turn, and formats - by calling a delegate (which may have come from another to start with). - - - - - Builder for a pattern which implements parsing and formatting as a sequence of steps applied - in turn. - - - - - Sets this pattern to only be capable of formatting; any attempt to parse using the - built pattern will fail immediately. - - - - - Performs common parsing operations: start with a parse action to move the - value cursor onto the first character, then call a character handler for each - character in the pattern to build up the steps. If any handler fails, - that failure is returned - otherwise the return value is null. - - - - - Validates the combination of fields used. - - - - - Returns a built pattern. This is mostly to keep the API for the builder separate from that of the pattern, - and for thread safety (publishing a new object, thus leading to a memory barrier). - Note that this builder *must not* be used after the result has been built. - - - - - Registers that a pattern field has been used in this pattern, and throws a suitable error - result if it's already been used. - - - - - Adds text which must be matched exactly when parsing, and appended directly when formatting. - This overload uses the same failure result for all text values. - - - - - Handle a leading "%" which acts as a pseudo-escape - it's mostly used to allow format strings such as "%H" to mean - "use a custom format string consisting of H instead of a standard pattern H". - - - - - Returns a handler for a zero-padded purely-numeric field specifier, such as "seconds", "minutes", "24-hour", "12-hour" etc. - - Maximum permissable count (usually two) - Field to remember that we've seen - Minimum valid value for the field (inclusive) - Maximum value value for the field (inclusive) - Delegate to retrieve the field value when formatting - Delegate to set the field value into a bucket when parsing - The pattern parsing failure, or null on success. - - - - Adds a character which must be matched exactly when parsing, and appended directly when formatting. - - - - - Adds parse actions for a list of strings, such as days of the week or month names. - The parsing is performed case-insensitively. All candidates are tested, and only the longest - match is used. - TODO: Make this much more efficient in terms of capture... - - - - - Adds parse actions for two list of strings, such as non-genitive and genitive month names. - The parsing is performed case-insensitively. All candidates are tested, and only the longest - match is used. - TODO: Make this much more efficient in terms of capture... - - - - - Find the longest match from a given set of candidate strings, updating the index/length of the best value - accordingly. - - - - - Adds parse and format actions for a mandatory positive/negative sign. - - Action to take when to set the given sign within the bucket - Predicate to detect whether the value being formatted is non-negative - - - - Adds parse and format actions for an "negative only" sign. - - Action to take when to set the given sign within the bucket - Predicate to detect whether the value being formatted is non-negative - - - - Hack to handle genitive month names - we only know what we need to do *after* we've parsed the whole pattern. - - - - - Represents a pattern for parsing and formatting values. - - This type is immutable reference type. See the thread safety section of the user guide for more information. - - - - Pattern which uses the normal ISO format for all the supported ISO - fields, but extends the time part with "s" for milliseconds and "t" for ticks. - No normalization is carried out, and a period may contain weeks as well as years, months and days. - Each element may also be negative, independently of other elements. This pattern round-trips its - values: a parse/format cycle will produce an identical period, including units. - - - - - A "normalizing" pattern which abides by the ISO-8601 duration format as far as possible. - Weeks are added to the number of days (after multiplying by 7). Time units are normalized - (extending into days where necessary), and fractions of seconds are represented within the - seconds part. Unlike ISO-8601, which pattern allows for negative values within a period. - - - Note that normalizing the period when formatting will cause an - if the period contains more than ticks when the - combined weeks/days/time portions are considered. Such a period could never - be useful anyway, however. - - - - - Parses the given text value according to the rules of this pattern. - - - This method never throws an exception (barring a bug in Noda Time itself). Even errors such as - the argument being null are wrapped in a parse result. - - The text value to parse. - The result of parsing, which may be successful or unsuccessful. - - - - Formats the given period as text according to the rules of this pattern. - - The period to format. - The period formatted according to this pattern. - - - - Provides a cursor over text being parsed. None of the methods in this class throw exceptions (unless - there is a bug in Noda Time, in which case an exception is appropriate) and none of the methods - have ref parameters indicating failures, unlike subclasses. This class is used as the basis for both - value and pattern parsing, so can make no judgement about what's wrong (i.e. it wouldn't know what - type of failure to indicate). Instead, methods return Boolean values to indicate success or failure. - - - - - A nul character. This character is not allowed in any parsable string and is used to - indicate that the current character is not set. - - - - - Initializes a new instance to parse the given value. - - - - - Gets the current character. - - - - - Gets a value indicating whether this instance has more characters. - - - true if this instance has more characters; otherwise, false. - - - - - Gets the current index into the string being parsed. - - - - - Gets the length of the string being parsed. - - - - - Gets the string being parsed. - - - - - Gets the remainder the string that has not been parsed yet. - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Returns the next character if there is one or if there isn't. - - - - - - Moves the specified target index. If the new index is out of range of the valid indicies - for this string then the index is set to the beginning or the end of the string whichever - is nearest the requested index. - - Index of the target. - true if the requested index is in range. - - - - Moves to the next character. - - true if the requested index is in range. - - - - Moves to the previous character. - - true if the requested index is in range. - - - - Base class for "buckets" of parse data - as field values are parsed, they are stored in a bucket, - then the final value is calculated at the end. - - - - - Performs the final conversion from fields to a value. The parse can still fail here, if there - are incompatible field values. - - Indicates which fields were part of the original text pattern. - Complete value being parsed - - - - Convenience method to check whether a particular field has been used. It's here as it'll primarily - be used by buckets; ideally we'd make it an extension method on PatternFields, or use Unconstrained - Melody... - - - - - Convenience method to check whether a particular field set of fields has been used. This is - similar to , except it's expected to be used with multiple fields, - and will only return true if all the specified fields are present. - - - - - The result of a parse operation. - - The type which was parsed, such as a . - This type is immutable reference type. See the thread safety section of the user guide for more information. - - - - Returns the value from the parse operation if it was successful, or throws an exception indicating the parse failure - otherwise. - - - This method is exactly equivalent to calling the method, but is terser if the code is - already clear that it will throw if the parse failed. - - The result of the parsing operation if it was successful. - - - - Returns an exception indicating the cause of the parse failure. - - This property is typically used to wrap parse failures in higher level exceptions. - The exception indicating the cause of the parse failure. - The parse operation succeeded. - - - - Returns the value from the parse operation if it was successful, or throws an exception indicating the parse failure - otherwise. - - - This method is exactly equivalent to fetching the property, but more explicit in terms of throwing - an exception on failure. - - The result of the parsing operation if it was successful. - - - - Returns the success value, and sets the out parameter to either - the specified failure value of T or the successful parse result value. - - The "default" value to set in if parsing failed. - The parameter to store the parsed value in on success. - True if this parse result was successful, or false otherwise. - - - - Indicates whether the parse operation was successful. - - - This returns True if and only if fetching the value with the property will return with no exception. - - - - - Converts this result to a new target type, either by executing the given projection - for a success result, or propagating the exception provider for failure. - - - - - Converts this result to a new target type by propagating the exception provider. - This parse result must already be an error result. - - - - - This isn't really an issue with the value so much as the pattern... but the result is the same. - - - - - Two fields (e.g. "hour of day" and "hour of half day") were mutually inconsistent. - - - - - The month of year is inconsistent between the text and numeric specifications. - We can't use InconsistentValues for this as the pattern character is the same in both cases. - - - - - The day of month is inconsistent with the day of week value. - We can't use InconsistentValues for this as the pattern character is the same in both cases. - - - - - We'd expected to get to the end of the string now, but we haven't. - - - - - Exception thrown to indicate that the specified value could not be parsed. - - Any public static members of this type are thread safe. Any instance members are not guaranteed to be thread safe. - See the thread safety section of the user guide for more information. - - - - - Creates a new UnparsableValueException with no message. - - - - - Creates a new UnparsableValueException with the given message. - - The failure message - - - - Initializes a new instance of the class. - - The string to parse. - - - - Attempts to match the specified character with the current character of the string. If the - character matches then the index is moved passed the character. - - The character to match. - true if the character matches. - - - - Attempts to match the specified string with the current point in the string. If the - character matches then the index is moved past the string. - - The string to match. - true if the string matches. - - - - Attempts to match the specified string with the current point in the string in a case-insensitive - manner, according to the given comparison info. The cursor is optionally updated to the end of the match. - - - - - Compares the value from the current cursor position with the given match. If the - given match string is longer than the remaining length, the comparison still goes - ahead but the result is never 0: if the result of comparing to the end of the - value returns 0, the result is -1 to indicate that the value is earlier than the given match. - Conversely, if the remaining value is longer than the match string, the comparison only - goes as far as the end of the match. So "xabcd" with the cursor at "a" will return 0 when - matched with "abc". - - A negative number if the value (from the current cursor position) is lexicographically - earlier than the given match string; 0 if they are equal (as far as the end of the match) and - a positive number if the value is lexicographically later than the given match string. - - - - Parses digits at the current point in the string as a signed 64-bit integer value. - Currently this method only supports cultures whose negative sign is "-" (and - using ASCII digits). - - The result integer value. The value of this is not guaranteed - to be anything specific if the return value is non-null. - null if the digits were parsed, or the appropriate parse failure - - - - Parses digits at the current point in the string. If the minimum required - digits are not present then the index is unchanged. If there are more digits than - the maximum allowed they are ignored. - - The minimum allowed digits. - The maximum allowed digits. - The result integer value. The value of this is not guaranteed - to be anything specific if the return value is false. - true if the digits were parsed. - - - - Parses digits at the current point in the string as a fractional value. - At least one digit must be present, if allRequired is false there's no requirement for *all* - the digits to be present. - - The maximum allowed digits. - The scale of the fractional value. - The result value scaled by scale. The value of this is not guaranteed - to be anything specific if the return value is false. - If true, digits must be present in the - input sequence. If false, there must be just at least one digit. - true if the digits were parsed. - - - - Gets the integer value of the current digit character, or -1 for "not a digit". - - - This currently only handles ASCII digits, which is all we have to parse to stay in line with the BCL. - - - - - Attempts to parse a fixed time zone from "UTC" with an optional - offset, expressed as +HH, +HH:mm, +HH:mm:ss or +HH:mm:ss.fff - i.e. the - general format. If it manages, it will move the cursor and return the - zone. Otherwise, it will return null and the cursor will remain where - it was. - - - - - Tries to parse a time zone ID from the provider. Returns the zone - on success (after moving the cursor to the end of the ID) or null on failure - (leaving the cursor where it was). - - - - - Represents a clock which can return the current time as an . - - - is intended for use anywhere you need to have access to the current time. - Although it's not strictly incorrect to call SystemClock.Instance.Now directly, - in the same way as you might call , it's strongly discouraged - as a matter of style for production code. We recommend providing an instance of - to anything that needs it, which allows you to write tests using the fake clock in the NodaTime.Testing - assembly (or your own implementation). - - - - All implementations in Noda Time are thread-safe; custom implementations - should be thread-safe too. See the thread safety section of the user guide for more information. - - - - - Gets the current on the time line according to this clock. - - - - - Equates the days of the week with their numerical value according to - ISO-8601. This corresponds with System.DayOfWeek except for Sunday, which - is 7 in the ISO numbering and 0 in System.DayOfWeek. - - - - - Value indicating no day of the week; this will never be returned - by any IsoDayOfWeek property, and is not valid as an argument to - any method. - - - - - Value representing Monday (1). - - - - - Value representing Tuesday (2). - - - - - Value representing Wednesday (3). - - - - - Value representing Thursday (4). - - - - - Value representing Friday (5). - - - - - Value representing Saturday (6). - - - - - Value representing Sunday (7). - - - - - LocalDate is an immutable struct representing a date within the calendar, - with no reference to a particular time zone or time of day. - - - Comparisons of dates can be handled in a way which is either calendar-sensitive or calendar-insensitive. - Noda Time implements all the operators (and the method) such that all operators other than - will return false if asked to compare two values in different calendar systems. - - - However, the method (implementing ) is calendar-insensitive; it compares the two - dates historically in terms of when they actually occurred, as if they're both converted to some "neutral" calendar system first. - - - It's unclear at the time of this writing whether this is the most appropriate approach, and it may change in future versions. In general, - it would be a good idea for users to avoid comparing dates in different calendar systems, and indeed most users are unlikely to ever explicitly - consider which calendar system they're working in anyway. - - - This type is an immutable value type. See the thread safety section of the user guide for more information. - - - - Constructs an instance for the given year, month and day in the ISO calendar. - - The year. This is the "absolute year", so a value of 0 means 1 BC, for example. - The month of year. - The day of month. - The resulting date. - The parameters do not form a valid date. - - - - Constructs an instance for the given year, month and day in the specified calendar. - - The year. This is the "absolute year", so, for - the ISO calendar, a value of 0 means 1 BC, for example. - The month of year. - The day of month. - Calendar system in which to create the date. - The resulting date. - The parameters do not form a valid date. - - - - Constructs an instance for the given era, year of era, month and day in the ISO calendar. - - The era within which to create a date. Must be a valid era within the ISO calendar. - The year of era. - The month of year. - The day of month. - The resulting date. - The parameters do not form a valid date. - - - - Constructs an instance for the given era, year of era, month and day in the specified calendar. - - The era within which to create a date. Must be a valid era within the specified calendar. - The year of era. - The month of year. - The day of month. - Calendar system in which to create the date. - The resulting date. - The parameters do not form a valid date. - - - Gets the calendar system associated with this local date. - - - Gets the year of this local date. - This returns the "absolute year", so, for the ISO calendar, - a value of 0 means 1 BC, for example. - - - Gets the month of this local date within the year. - - - Gets the day of this local date within the month. - - - - Gets the week day of this local date expressed as an value, - for calendars which use ISO days of the week. - - The underlying calendar doesn't use ISO days of the week. - - - - - Gets the week day of this local date as a number. - - - For calendars using ISO week days, this gives 1 for Monday to 7 for Sunday. - - - - - - Gets the "week year" of this local date. - - - - The WeekYear is the year that matches with the field. - In the standard ISO8601 week algorithm, the first week of the year - is that in which at least 4 days are in the year. As a result of this - definition, day 1 of the first week may be in the previous year. - The WeekYear allows you to query the effective year for that day. - - - For example, January 1st 2011 was a Saturday, so only two days of that week - (Saturday and Sunday) were in 2011. Therefore January 1st is part of - week 52 of WeekYear 2010. Conversely, December 31st 2012 is a Monday, - so is part of week 1 of WeekYear 2013. - - - - - Gets the week within the WeekYear. See for more details. - - - Gets the year of this local date within the century. - This always returns a value in the range 0 to 99 inclusive. - - - Gets the year of this local date within the era. - - - Gets the era of this local date. - - - Gets the day of this local date within the year. - - - - Gets a at midnight on the date represented by this local date. - - The representing midnight on this local date, in the same calendar - system. - - - - Returns the local date corresponding to the given "week year", "week of week year", and "day of week" - in the ISO calendar system. - - ISO-8601 week year of value to return - ISO-8601 week of week year of value to return - ISO-8601 day of week to return - The date corresponding to the given week year / week of week year / day of week. - - - - Adds the specified period to the date. - - The date to add the period to - The period to add. Must not contain any (non-zero) time units. - The sum of the given date and period - - - - Adds the specified period to the date. Friendly alternative to operator+(). - - The date to add the period to - The period to add. Must not contain any (non-zero) time units. - The sum of the given date and period - - - - Adds the specified period to this date. Fluent alternative to operator+(). - - The period to add. Must not contain any (non-zero) time units. - The sum of this date and the given period - - - - Combines the given and components - into a single . - - The date to add the time to - The time to add - The sum of the given date and time - - - - Subtracts the specified period from the date. - - The date to subtract the period from - The period to subtract. Must not contain any (non-zero) time units. - The result of subtracting the given period from the date - - - - Subtracts the specified period from the date. Friendly alternative to operator-(). - - The date to subtract the period from - The period to subtract. Must not contain any (non-zero) time units. - The result of subtracting the given period from the date. - - - - Subtracts the specified period from this date. Fluent alternative to operator-(). - - The period to subtract. Must not contain any (non-zero) time units. - The result of subtracting the given period from this date. - - - - Compares two values for equality. This requires - that the dates be the same, within the same calendar. - - The first value to compare - The second value to compare - True if the two dates are the same and in the same calendar; false otherwise - - - - Compares two values for inequality. - - The first value to compare - The second value to compare - False if the two dates are the same and in the same calendar; true otherwise - - - - Compares two LocalDate values to see if the left one is strictly earlier than the right - one. - - - This operator always returns false if the two operands have different calendars. See the top-level type - documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is strictly earlier than , false otherwise. - - - - Compares two LocalDate values to see if the left one is earlier than or equal to the right - one. - - - This operator always returns false if the two operands have different calendars. See the top-level type - documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is earlier than or equal to , false otherwise. - - - - Compares two LocalDate values to see if the left one is strictly later than the right - one. - - - This operator always returns false if the two operands have different calendars. See the top-level type - documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is strictly later than , false otherwise. - - - - Compares two LocalDate values to see if the left one is later than or equal to the right - one. - - - This operator always returns false if the two operands have different calendars. See the top-level type - documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is later than or equal to , false otherwise. - - - - Indicates whether this date is earlier, later or the same as another one. - - - The comparison is performed in terms of a calendar-independent notion of date; - the calendar systems of both values are ignored. When both values use the same calendar, - this is absolutely natural. However, when comparing a value in one calendar with a value in another, - this can lead to surprising results. For example, 1945 in the ISO calendar corresponds to around 1364 - in the Islamic calendar, so an Islamic date in year 1400 is "after" a date in 1945 in the ISO calendar. - - The other date to compare this one with - A value less than zero if this date is earlier than ; - zero if this date is the same as ; a value greater than zero if this date is - later than . - - - - Implementation of to compare two LocalDates. - - - This uses explicit interface implementation to avoid it being called accidentally. The generic implementation should usually be preferred. - - is non-null but does not refer to an instance of . - The object to compare this value with. - The result of comparing this LocalDate with another one; see for general details. - If is null, this method returns a value greater than 0. - - - - - Returns a hash code for this local date. - - A hash code for this local date. - - - - Compares two values for equality. This requires - that the dates be the same, within the same calendar. - - The object to compare this date with. - True if the given value is another local date equal to this one; false otherwise. - - - - Compares two values for equality. This requires - that the dates be the same, within the same calendar. - - The value to compare this date with. - True if the given value is another local date equal to this one; false otherwise. - - - - Creates a new LocalDate representing the same physical date, but in a different calendar. - The returned LocalDate is likely to have different field values to this one. - For example, January 1st 1970 in the Gregorian calendar was December 19th 1969 in the Julian calendar. - - The calendar system to convert this local date to. - The converted LocalDate - - - - Returns a new LocalDate representing the current value with the given number of years added. - - - If the resulting date is invalid, lower fields (typically the day of month) are reduced to find a valid value. - For example, adding one year to February 29th 2012 will return February 28th 2013; subtracting one year from - February 29th 2012 will return February 28th 2011. - - The number of years to add - The current value plus the given number of years. - - - - Returns a new LocalDate representing the current value with the given number of months added. - - - - This method does not try to maintain the year of the current value, so adding four months to a value in - October will result in a value in the following February. - - - If the resulting date is invalid, the day of month is reduced to find a valid value. - For example, adding one month to January 30th 2011 will return February 28th 2011; subtracting one month from - March 30th 2011 will return February 28th 2011. - - - The number of months to add - The current date plus the given number of months - - - - Returns a new LocalDate representing the current value with the given number of days added. - - - - This method does not try to maintain the month or year of the current value, so adding 3 days to a value of January 30th - will result in a value of February 2nd. - - - The number of days to add - The current value plus the given number of days. - - - - Returns a new LocalDate representing the current value with the given number of weeks added. - - The number of weeks to add - The current value plus the given number of weeks. - - - - Returns the next falling on the specified . - This is a strict "next" - if this date on already falls on the target - day of the week, the returned value will be a week later. - - The ISO day of the week to return the next date of. - The next falling on the specified day of the week. - The underlying calendar doesn't use ISO days of the week. - is not a valid day of the - week (Monday to Sunday). - - - - Returns the previous falling on the specified . - This is a strict "previous" - if this date on already falls on the target - day of the week, the returned value will be a week earlier. - - The ISO day of the week to return the previous date of. - The previous falling on the specified day of the week. - The underlying calendar doesn't use ISO days of the week. - is not a valid day of the - week (Monday to Sunday). - - - - Combines this with the given - into a single . - Fluent alternative to operator+(). - - The time to combine with this date. - The representation of the given time on this date - - - - Returns a that represents this instance. - - - The value of the current instance in the default format pattern ("D"), using the current thread's - culture to obtain a format provider. - - - - - Formats the value of the current instance using the specified pattern. - - - A containing the value of the current instance in the specified format. - - The specifying the pattern to use, - or null to use the default format pattern ("D"). - - The to use when formatting the value, - or null to use the current thread's culture to obtain a format provider. - - 2 - - - - - - - - - - - - - LocalTime is an immutable struct representing a time of day, with no reference - to a particular calendar, time zone or date. - - This type is an immutable value type. See the thread safety section of the user guide for more information. - - - - Local time at midnight, i.e. 0 hours, 0 minutes, 0 seconds. - - - - - Combines this with the given - into a single . - Fluent alternative to operator+(). - - The date to combine with this time - The representation of the given time on this date - - - - Local time at noon, i.e. 12 hours, 0 minutes, 0 seconds. - - - - - Ticks since midnight, in the range [0, 864,000,000,000). - - - - - Creates a local time at the given hour and minute, with second, millisecond-of-second - and tick-of-millisecond values of zero. - - The hour of day. - The minute of the hour. - The parameters do not form a valid time. - The resulting time. - - - - Creates a local time at the given hour, minute and second, - with millisecond-of-second and tick-of-millisecond values of zero. - - The hour of day. - The minute of the hour. - The second of the minute. - The parameters do not form a valid time. - The resulting time. - - - - Creates a local time at the given hour, minute, second and millisecond, - with a tick-of-millisecond value of zero. - - The hour of day. - The minute of the hour. - The second of the minute. - The millisecond of the second. - The parameters do not form a valid time. - The resulting time. - - - - Creates a local time at the given hour, minute, second, millisecond and tick within millisecond. - - The hour of day. - The minute of the hour. - The second of the minute. - The millisecond of the second. - The tick within the millisecond. - The parameters do not form a valid time. - The resulting time. - - - - Factory method for creating a local time from the hour of day, minute of hour, second of minute, and tick of second. - - - This is not a constructor overload as it would have the same signature as the one taking millisecond of second. - - The hour of day in the desired time, in the range [0, 23]. - The minute of hour in the desired time, in the range [0, 59]. - The second of minute in the desired time, in the range [0, 59]. - The tick within the second in the desired time, in the range [0, 9999999]. - The parameters do not form a valid time. - The resulting time. - - - - Factory method for creating a local time from the number of ticks which have elapsed since midnight. - - The number of ticks, in the range [0, 863,999,999,999] - The resulting time. - - - - Factory method for creating a local time from the number of milliseconds which have elapsed since midnight. - - The number of milliseconds, in the range [0, 86,399,999] - The resulting time. - - - - Factory method for creating a local time from the number of seconds which have elapsed since midnight. - - The number of seconds, in the range [0, 86,399] - The resulting time. - - - - Constructor only called from other parts of Noda Time - trusted to be within January 1st 1970 UTC. - - - - - Gets the hour of day of this local time, in the range 0 to 23 inclusive. - - - - - Gets the hour of the half-day of this local time, in the range 1 to 12 inclusive. - - - - - Gets the minute of this local time, in the range 0 to 59 inclusive. - - - - - Gets the second of this local time within the minute, in the range 0 to 59 inclusive. - - - - - Gets the millisecond of this local time within the second, in the range 0 to 999 inclusive. - - - - - Gets the tick of this local time within the second, in the range 0 to 9,999,999 inclusive. - - - - - Gets the tick of this local time within the day, in the range 0 to 863,999,999,999 inclusive. - - - - - Returns a with this local time, on January 1st 1970 in the ISO - calendar. - - - - - Creates a new local time by adding a period to an existing time. The period must not contain - any date-related units (days etc) with non-zero values. - - The time to add the period to - The period to add - The result of adding the period to the time, wrapping via midnight if necessary - - - - Adds the specified period to the time. Friendly alternative to operator+(). - - The time to add the period to - The period to add. Must not contain any (non-zero) date units. - The sum of the given time and period - - - - Adds the specified period to this time. Fluent alternative to operator+(). - - The period to add. Must not contain any (non-zero) date units. - The sum of this time and the given period - - - - Creates a new local time by subtracting a period from an existing time. The period must not contain - any date-related units (days etc) with non-zero values. - - The time to subtract the period from - The period to subtract - The result of subtract the period from the time, wrapping via midnight if necessary - - - - Subtracts the specified period from the time. Friendly alternative to operator-(). - - The time to subtract the period from - The period to subtract. Must not contain any (non-zero) date units. - The result of subtracting the given period from the time. - - - - Subtracts the specified period from this time. Fluent alternative to operator-(). - - The period to subtract. Must not contain any (non-zero) date units. - The result of subtracting the given period from this time. - - - - Compares two local times for equality, by checking whether they represent - the exact same local time, down to the tick. - - The first value to compare - The second value to compare - True if the two times are the same; false otherwise - - - - Compares two local times for inequality. - - The first value to compare - The second value to compare - False if the two times are the same; true otherwise - - - - Compares two LocalTime values to see if the left one is strictly earlier than the right - one. - - First operand of the comparison - Second operand of the comparison - true if the is strictly earlier than , false otherwise. - - - - Compares two LocalTime values to see if the left one is earlier than or equal to the right - one. - - First operand of the comparison - Second operand of the comparison - true if the is earlier than or equal to , false otherwise. - - - - Compares two LocalTime values to see if the left one is strictly later than the right - one. - - First operand of the comparison - Second operand of the comparison - true if the is strictly later than , false otherwise. - - - - Compares two LocalTime values to see if the left one is later than or equal to the right - one. - - First operand of the comparison - Second operand of the comparison - true if the is later than or equal to , false otherwise. - - - - Indicates whether this time is earlier, later or the same as another one. - - The other date/time to compare this one with - A value less than zero if this time is earlier than ; - zero if this time is the same as ; a value greater than zero if this time is - later than . - - - - Implementation of to compare two LocalTimes. - - - This uses explicit interface implementation to avoid it being called accidentally. The generic implementation should usually be preferred. - - is non-null but does not refer to an instance of . - The object to compare this value with. - The result of comparing this LocalTime with another one; see for general details. - If is null, this method returns a value greater than 0. - - - - - Returns a hash code for this local time. - - A hash code for this local time. - - - - Compares this local time with the specified one for equality, - by checking whether the two values represent the exact same local time, down to the tick. - - The other local time to compare this one with - True if the specified time is equal to this one; false otherwise - - - - Compares this local time with the specified reference. A local time is - only equal to another local time with the same underlying tick value. - - The object to compare this one with - True if the specified value is a local time is equal to this one; false otherwise - - - - Returns a new LocalTime representing the current value with the given number of hours added. - - - If the value goes past the start or end of the day, it wraps - so 11pm plus two hours is 1am, for example. - - The number of hours to add - The current value plus the given number of hours. - - - - Returns a new LocalTime representing the current value with the given number of minutes added. - - - If the value goes past the start or end of the day, it wraps - so 11pm plus 120 minutes is 1am, for example. - - The number of minutes to add - The current value plus the given number of minutes. - - - - Returns a new LocalTime representing the current value with the given number of seconds added. - - - If the value goes past the start or end of the day, it wraps - so 11:59pm plus 120 seconds is 12:01am, for example. - - The number of seconds to add - The current value plus the given number of seconds. - - - - Returns a new LocalTime representing the current value with the given number of milliseconds added. - - The number of milliseconds to add - The current value plus the given number of milliseconds. - - - - Returns a new LocalTime representing the current value with the given number of ticks added. - - The number of ticks to add - The current value plus the given number of ticks. - - - - Returns a that represents this instance. - - - The value of the current instance in the default format pattern ("T"), using the current thread's - culture to obtain a format provider. - - - - - Formats the value of the current instance using the specified pattern. - - - A containing the value of the current instance in the specified format. - - The specifying the pattern to use, - or null to use the default format pattern ("T"). - - The to use when formatting the value, - or null to use the current thread's culture to obtain a format provider. - - 2 - - - - - - - - - - - - - - The NodaTime namespace contains the core types for Noda Time, including the main public classes for time zone and calendar - support which have implementations (and less frequently used types) in other namespaces. For formatting and parsing functionality, see the - namespace. - - - - - - An offset from UTC in milliseconds. A positive value means that the local time is - ahead of UTC (e.g. for Europe); a negative value means that the local time is behind - UTC (e.g. for America). - - - Offsets are always strictly less than 24 hours (as either a positive or negative offset). - - This type is an immutable value type. See the thread safety section of the user guide for more information. - - - - An offset of zero ticks - effectively the permanent offset for UTC. - - - - - The minimum permitted offset; one millisecond less than a standard day before UTC. - - - - - The maximum permitted offset; one millisecond less than a standard day after UTC. - - - - - Initializes a new instance of the struct. - - - Offsets are constrained to the range (-24 hours, 24 hours). - - The number of milliseconds in the offset. - The result of the operation is outside the range of Offset. - - - - Gets the total number of milliseconds in the offset, which may be negative. - - - - - Returns the number of ticks represented by this offset, which may be negative. - - - Offsets are only accurate to millisecond precision; the number of milliseconds is simply multiplied - by 10,000 to give the number of ticks. - - The number of ticks. - - - - Returns the greater offset of the given two, i.e. the one which will give a later local - time when added to an instant. - - The first offset - The second offset - The greater offset of and . - - - - Returns the lower offset of the given two, i.e. the one which will give an earlier local - time when added to an instant. - - The first offset - The second offset - The lower offset of and . - - - - Implements the unary operator - (negation). - - The offset to negate. - A new instance with a negated value. - - - - Returns the negation of the specified offset. This is the method form of the unary minus operator. - - The offset to negate. - The negation of the specified offset. - - - - Implements the unary operator + . - - The operand. - There is no method form of this operator; the method is an instance - method for addition, and is more useful than a method form of this would be. - The same instance - - - - Implements the operator + (addition). - - The left hand side of the operator. - The right hand side of the operator. - The result of the operation is outside the range of Offset. - A new representing the sum of the given values. - The result of the operation is outside the range of Offset. - - - - Adds one Offset to another. Friendly alternative to operator+(). - - The left hand side of the operator. - The right hand side of the operator. - The result of the operation is outside the range of Offset. - A new representing the sum of the given values. - The result of the operation is outside the range of Offset. - - - - Returns the result of adding another Offset to this one, for a fluent alternative to operator+(). - - The offset to add - The result of the operation is outside the range of Offset. - The result of adding the other offset to this one. - - - - Implements the operator - (subtraction). - - The left hand side of the operator. - The right hand side of the operator. - The result of the operation is outside the range of Offset. - A new representing the difference of the given values. - The result of the operation is outside the range of Offset. - - - - Subtracts one Offset from another. Friendly alternative to operator-(). - - The left hand side of the operator. - The right hand side of the operator. - The result of the operation is outside the range of Offset. - A new representing the difference of the given values. - The result of the operation is outside the range of Offset. - - - - Returns the result of subtracting another Offset from this one, for a fluent alternative to operator-(). - - The offset to subtract - The result of the operation is outside the range of Offset. - The result of subtracting the other offset from this one. - - - - Implements the operator == (equality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are equal to each other, otherwise false. - - - - Implements the operator != (inequality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are not equal to each other, otherwise false. - - - - Implements the operator < (less than). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is less than the right value, otherwise false. - - - - Implements the operator <= (less than or equal). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is less than or equal to the right value, otherwise false. - - - - Implements the operator > (greater than). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is greater than the right value, otherwise false. - - - - Implements the operator >= (greater than or equal). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is greater than or equal to the right value, otherwise false. - - - - Compares the current object with another object of the same type. - - An object to compare with this object. - - A 32-bit signed integer that indicates the relative order of the objects being compared. - The return value has the following meanings: - - - Value - Meaning - - - < 0 - This object is less than the parameter. - - - 0 - This object is equal to . - - - > 0 - This object is greater than . - - - - - - - Implementation of to compare two offsets. - - - This uses explicit interface implementation to avoid it being called accidentally. The generic implementation should usually be preferred. - - is non-null but does not refer to an instance of . - The object to compare this value with. - The result of comparing this instant with another one; see for general details. - If is null, this method returns a value greater than 0. - - - - - Indicates whether the current object is equal to another object of the same type. - - An object to compare with this object. - - true if the current object is equal to the parameter; - otherwise, false. - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Returns a that represents this instance. - - - The value of the current instance in the default format pattern ("g"), using the current thread's - culture to obtain a format provider. - - - - - Formats the value of the current instance using the specified pattern. - - - A containing the value of the current instance in the specified format. - - The specifying the pattern to use, - or null to use the default format pattern ("g"). - - The to use when formatting the value, - or null to use the current thread's culture to obtain a format provider. - - 2 - - - - Returns the offset for the given milliseconds value, which may be negative. - - The int milliseconds value. - The for the given milliseconds value - The result of the operation is outside the range of Offset. - - - - Creates a new offset from the given number of ticks, which may be negative. - - - Offsets are only accurate to millisecond precision; the given number of ticks is simply divided - by 10,000 to give the number of milliseconds - any remainder is truncated. - - The number of ticks specifying the length of the new offset. - An offset representing the given number of ticks, to the (truncated) millisecond. - The result of the operation is outside the range of Offset. - - - - Creates an offset with the specified number of hours, which may be negative. - - The number of hours to represent in the new offset. - - A new representing the given value. - - The result of the operation is outside the range of Offset. - - - - Creates an offset with the specified number of hours and minutes. - - - The result simply takes the hours and minutes and converts each component into milliseconds - separately. As a result, a negative offset should usually be obtained by making both arguments - negative. For example, to obtain "three hours and ten minutes behind UTC" you might call - Offset.FromHoursAndMinutes(-3, -10). - - The number of hours to represent in the new offset. - The number of minutes to represent in the new offset. - - A new representing the given value. - - The result of the operation is outside the range of Offset. - - - - Converts this offset to a .NET standard value. - - An equivalent to this value. - - - - Converts the given to an offset, with fractional milliseconds truncated. - - The timespan to convert - The given time span falls outside the range of +/- 24 hours. - A new offset for the same time as the given time span. - The result of the operation is outside the range of Offset. - - - - - - - - - - - - - Represents a local date and time without reference to a calendar system, - as the number of ticks since the Unix epoch which would represent that time - of the same date in UTC. This needs a better description, and possibly a better name - at some point... - - - - - Initializes a new instance of the struct. - - The number of ticks from the Unix Epoch. - - - - Convenience constructor for test purposes. - - - - - Ticks since the Unix epoch. - - - - - Constructs a from this LocalInstant which has a - of and represents the same local date and time as this value. - - - is slightly odd - it can be treated as UTC if you use - or as system local time if you use , but it's the only kind which allows - you to construct a with an arbitrary offset, which makes it as close to - the Noda Time non-system-specific "local" concept as exists in .NET. - - - - - Converts a of any kind to a LocalDateTime in the ISO calendar. This does not perform - any time zone conversions, so a DateTime with a of - will still have the same day/hour/minute etc - it won't be converted into the local system time. - - - - - Returns an instant after adding the given duration - - - - - Adds a duration to a local instant. Friendly alternative to operator-(). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the sum of the given values. - - - - Returns the difference between two instants as a duration. - - - - - Subtracts the given time zone offset from this local instant, to give an . - - - This would normally be implemented as an operator, but as the corresponding "plus" operation - on Instant cannot be written (as Instant is a public class and LocalInstant is an internal class) - it makes sense to keep them both as methods for consistency. - - The offset between UTC and a time zone for this local instant - A new representing the difference of the given values. - - - - Returns an instant after subtracting the given duration - - - - - Subtracts one local instant from another. Friendly alternative to operator-(). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the difference of the given values. - - - - Subtracts a duration from a local instant. Friendly alternative to operator-(). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the difference of the given values. - - - - Implements the operator == (equality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are equal to each other, otherwise false. - - - - Implements the operator != (inequality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are not equal to each other, otherwise false. - - - - Implements the operator < (less than). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is less than the right value, otherwise false. - - - - Implements the operator <= (less than or equal). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is less than or equal to the right value, otherwise false. - - - - Implements the operator > (greater than). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is greater than the right value, otherwise false. - - - - Implements the operator >= (greater than or equal). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is greater than or equal to the right value, otherwise false. - - - - Convenience method to add the given number of ticks. Useful - for assembling date and time parts. - - - - - Compares the current object with another object of the same type. - - An object to compare with this object. - - A 32-bit signed integer that indicates the relative order of the objects being compared. - The return value has the following meanings: - - - Value - Meaning - - - < 0 - This object is less than the parameter. - - - 0 - This object is equal to . - - - > 0 - This object is greater than . - - - - - - - Implementation of to compare two local instants. - - - This uses explicit interface implementation to avoid it being called accidentally. The generic implementation should usually be preferred. - - is non-null but does not refer to an instance of . - The object to compare this value with. - The result of comparing this instant with another one; see for general details. - If is null, this method returns a value greater than 0. - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Indicates whether the current object is equal to another object of the same type. - - An object to compare with this object. - - true if the current object is equal to the parameter; - otherwise, false. - - - - - Represents a period of time expressed in human chronological terms: hours, days, - weeks, months and so on. - - - - A contains a set of properties such as , , and so on - that return the number of each unit contained within this period. Note that these properties are not normalized in - any way by default, and so a may contain values such as "2 hours and 90 minutes". The - method will convert equivalent periods into a standard representation. - - - Periods can contain negative units as well as positive units ("+2 hours, -43 minutes, +10 seconds"), but do not - differentiate between properties that are zero and those that are absent (i.e. a period created as "10 years" - and one created as "10 years, zero months" are equal periods; the property returns zero in - both cases). - - - equality is implemented by comparing each property's values individually. - - - Periods operate on calendar-related types such as - whereas operates on instants - on the time line. (Note that although includes both concepts, it only supports - duration-based arithmetic.) - - - This type is immutable reference type. See the thread safety section of the user guide for more information. - - - - In some cases, periods are represented as long[] arrays containing all possible units (years to - ticks). This is the size of those arrays. - - - - - A period containing only zero-valued properties. - - - - - Returns an equality comparer which compares periods by first normalizing them - so 24 hours is deemed equal to 1 day, and so on. - Note that as per the method, years and months are unchanged by normalization - so 12 months does not - equal 1 year. - - - - - Creates a new period from the given array. - - Values for each field - - - - Creates a new period from the given values. - - - - - Creates a new period with the given single value. - - - - - Creates a period representing the specified number of years. - - The number of years in the new period - A period consisting of the given number of years. - - - - Creates a period representing the specified number of weeks. - - The number of weeks in the new period - A period consisting of the given number of weeks. - - - - Creates a period representing the specified number of months. - - The number of months in the new period - A period consisting of the given number of months. - - - - Creates a period representing the specified number of days. - - The number of days in the new period - A period consisting of the given number of days. - - - - Creates a period representing the specified number of hours. - - The number of hours in the new period - A period consisting of the given number of hours. - - - - Creates a period representing the specified number of minutes. - - The number of minutes in the new period - A period consisting of the given number of minutes. - - - - Creates a period representing the specified number of seconds. - - The number of seconds in the new period - A period consisting of the given number of seconds. - - - - Creates a period representing the specified number of milliseconds. - - The number of milliseconds in the new period - A period consisting of the given number of milliseconds. - - - - Creates a period representing the specified number of ticks. - - The number of ticks in the new period - A period consisting of the given number of ticks. - - - - Adds two periods together, by simply adding the values for each property. - - The first period to add - The second period to add - The sum of the two periods. The units of the result will be the union of those in both - periods. - - - - Creates an for periods, using the given "base" local date/time. - - - Certain periods can't naturally be compared without more context - how "one month" compares to - "30 days" depends on where you start. In order to compare two periods, the returned comparer - effectively adds both periods to the "base" specified by and compares - the results. In some cases this arithmetic isn't actually required - when two periods can be - converted to durations, the comparer uses that conversion for efficiency. - - The base local date/time to use for comparisons. - The new comparer. - - - - Returns the property values in this period as an array. - - - - - Adds all the values in this period to the given array of values (which is assumed to be of the right - length). - - - - - Subtracts all the values in this period from the given array of values (which is assumed to be of the right - length). - - - - - Subtracts one period from another, by simply subtracting each property value. - - The period to subtract the second operand from - The period to subtract the first operand from - The result of subtracting all the values in the second operand from the values in the first. The - units of the result will be the union of both periods, even if the subtraction caused some properties to - become zero (so "2 weeks, 1 days" minus "2 weeks" is "zero weeks, 1 days", not "1 days"). - - - - Returns the period between a start and an end date/time, using only the given units. - - - If is before , each property in the returned period - will be negative. If the given set of units cannot exactly reach the end point (e.g. finding - the difference between 1am and 3:15am in hours) the result will be such that adding it to - will give a value between and . In other words, - any rounding is "towards start"; this is true whether the resulting period is negative or positive. - - Start date/time - End date/time - Units to use for calculations - is empty or contained unknown values. - and use different calendars. - The period between the given date/times, using the given units. - - - - Adds the contents of this period to the given local instant in the given calendar system. - - - - - Returns the exact difference between two date/times. - - - If is before , each property in the returned period - will be negative. - - Start date/time - End date/time - The period between the two date and time values, using all units. - - - - Returns the period between a start and an end date, using only the given units. - - - If is before , each property in the returned period - will be negative. If the given set of units cannot exactly reach the end point (e.g. finding - the difference between 12th February and 15th March in months) the result will be such that adding it to - will give a value between and . In other words, - any rounding is "towards start"; this is true whether the resulting period is negative or positive. - - Start date - End date - Units to use for calculations - contains time units, is empty or contains unknown values. - and use different calendars. - The period between the given dates, using the given units. - - - - Returns the exact difference between two dates. - - - If is before , each property in the returned period - will be negative. - - Start date - End date - The period between the two dates, using year, month and day units. - - - - Returns the period between a start and an end time, using only the given units. - - - If is before , each property in the returned period - will be negative. If the given set of units cannot exactly reach the end point (e.g. finding - the difference between 3am and 4.30am in hours) the result will be such that adding it to - will give a value between and . In other words, - any rounding is "towards start"; this is true whether the resulting period is negative or positive. - - Start time - End time - Units to use for calculations - contains date units, is empty or contains unknown values. - and use different calendars. - The period between the given times, using the given units. - - - - Returns the exact difference between two times. - - - If is before , each property in the returned period - will be negative. - - Start time - End time - The period between the two times, using the time period units. - - - - Returns whether or not this period contains any non-zero-valued time-based properties (hours or lower). - - - - - Returns whether or not this period contains any non-zero date-based properties (days or higher). - - - - - For periods that do not contain a non-zero number of years or months, returns a duration for this period - assuming a standard 7-day week, 24-hour day, 60-minute hour etc. - - The month or year property in the period is non-zero. - The period doesn't have years or months, but the calculation - overflows the bounds of . In some cases this may occur even though the theoretical - result would be valid due to balancing positive and negative values, but for simplicity there is - no attempt to work around this - in realistic periods, it shouldn't be a problem. - The duration of the period. - - - - Gets the total number of ticks duration for the 'standard' properties (all bar years and months). - - - - - Creates a from this instance. The new builder - is populated with the values from this period, but is then detached from it: - changes made to the builder are not reflected in this period. - - A builder with the same values and units as this period. - - - - Returns a normalized version of this period, such that equivalent (but potentially non-equal) periods are - changed to the same representation. - - - Months and years are unchanged - (as they can vary in length), but weeks are multiplied by 7 and added to the - Days property, and all time properties are normalized to their natural range - (where ticks are "within a millisecond"), adding to the larger property where - necessary. So for example, a period of 25 hours becomes a period of 1 day - and 1 hour. Aside from months and years, either all the properties - end up positive, or they all end up negative. - - The period doesn't have years or months, but it contains more than - ticks when the combined weeks/days/time portions are considered. Such a period - could never be useful anyway, however. - In some cases this may occur even though the theoretical result would be valid due to balancing positive and - negative values, but for simplicity there is no attempt to work around this - in realistic periods, it - shouldn't be a problem. - The normalized period. - - - - - Returns the PeriodField for the given unit value, or null if the values does - not represent a single unit. - - - - - Returns the PeriodField for the given index, in the range 0-8 inclusive. - - - - - Gets the number of years within this period. - - - This property returns zero both when the property has been explicitly set to zero and when the period does not - contain this property. - - - - - Gets the number of months within this period. - - - This property returns zero both when the property has been explicitly set to zero and when the period does not - contain this property. - - - - - Gets the number of weeks within this period. - - - This property returns zero both when the property has been explicitly set to zero and when the period does not - contain this property. - - - - - Gets the number of days within this period. - - - This property returns zero both when the property has been explicitly set to zero and when the period does not - contain this property. - - - - - Gets the number of hours within this period. - - - This property returns zero both when the property has been explicitly set to zero and when the period does not - contain this property. - - - - - Gets the number of minutes within this period. - - - This property returns zero both when the property has been explicitly set to zero and when the period does not - contain this property. - - - - - Gets the number of seconds within this period. - - - This property returns zero both when the property has been explicitly set to zero and when the period does not - contain this property. - - - - - Gets the number of milliseconds within this period. - - - This property returns zero both when the property has been explicitly set to zero and when the period does not - contain this property. - - - - - Gets the number of ticks within this period. - - - This property returns zero both when the property has been explicitly set to zero and when the period does not - contain this property. - - - - - Returns this string formatted according to the . - - A formatted representation of this period. - - - - Compares the given object for equality with this one, as per . - - The value to compare this one with. - true if the other object is a period equal to this one, consistent with - - - - Returns the hash code for this period, consistent with . - - The hash code for this period. - - - - Compares the given period for equality with this one. - - - Periods are equal if they contain the same values for the same properties. - However, no normalization takes place, so "one hour" is not equal to "sixty minutes". - - The period to compare this one with. - True if this period has the same values for the same properties as the one specified. - - - - Equality comparer which simply normalizes periods before comparing them. - - - - - Exception thrown to indicate that the specified local time doesn't - exist in a particular time zone due to daylight saving time changes. - - - - This normally occurs for spring transitions, where the clock goes forward - (usually by an hour). For example, suppose the time zone goes forward - at 2am, so the second after 01:59:59 becomes 03:00:00. In that case, - local times such as 02:30:00 never occur. - - - This exception is used to indicate such problems, as they're usually - not the same as other causes, - such as entering "15" for a month number. - - - Note that it is possible (though extremely rare) for a whole day to be skipped due to a time zone transition, - so this exception may also be thrown in cases where no local time is valid for a particular local date. (For - example, Samoa skipped December 30th 2011 entirely, transitioning from UTC-10 to UTC+14 at midnight.) - - - Any public static members of this type are thread safe. Any instance members are not guaranteed to be thread safe. - See the thread safety section of the user guide for more information. - - - - - The local date/time which is invalid in the time zone - - - - - The time zone in which the local date/time is invalid - - - - - Creates a new instance for the given local date/time and time zone. - - - User code is unlikely to need to deliberately call this constructor except - possibly for testing. - - The local date/time which is skipped in the specified time zone. - The time zone in which the local date/time does not exist. - - - - Singleton implementation of which reads the current system time. - It is recommended that for anything other than throwaway code, this is only referenced - in a single place in your code: where you provide a value to inject into the rest of - your application, which should only depend on the interface. - - This type has no state, and is thread-safe. See the thread safety section of the user guide for more information. - - - - The singleton instance of . - - The singleton instance of . - - - - Constructor present to prevent external construction. - - - - - Gets the current time as an . - - The current time in ticks as an . - - - - Provides a wrapper class that implements a simple cache to - speed up the lookup of transitions. - - - - The cache supports multiple caching strategies which are implemented in nested subclasses of - this one. Until we have a better sense of what the usage behavior is, we cannot tune the - cache. It is possible that we may support multiple strategies selectable at runtime so the - user can tune the performance based on their knowledge of how they are using the system. - - - In fact, only one cache type is currently implemented: an MRU cache existed before - the GetZoneIntervalPair call was created in DateTimeZone, but as it wasn't being used, it - was more effort than it was worth to update. The mechanism is still available for future - expansion though. - - - - - - Initializes a new instance of the class. - - The time zone to cache. - The caching map - - - - Gets the cached time zone. - - The time zone. - - - - Returns a cached time zone for the given time zone. - - - If the time zone is already cached or it is fixed then it is returned unchanged. - - The time zone to cache. - The cached time zone. - - - - Delegates fetching a zone interval to the caching map. - - - - - Writes the time zone to the specified writer. - - The writer to write to. - - - - Reads the zone from the specified reader. - - The reader. - The id. - - - - - Helper methods for creating IZoneIntervalMaps which cache results. - - - - - The type of cache to build. - - - - - Returns a caching map for the given input map. - - - - - This provides a simple cache based on two hash tables (one for local instants, another - for instants). - - - Each hash table entry is either entry or contains a node with enough - information for a particular "period" of about 40 days - so multiple calls for time - zone information within the same few years are likely to hit the cache. Note that - a single "period" may include a daylight saving change (or conceivably more than one); - a node therefore has to contain enough intervals to completely represent that period. - - If another call is made which maps to the same cache entry number but is for a different - period, the existing hash entry is simply overridden. - - - - - Defines the number of bits to shift an instant value to get the period. This - converts a number of ticks to a number of 40.6 days periods. - - - - - Gets the zone offset period for the given instant. Null is returned if no period is - defined by the time zone for the given instant. - - The Instant to test. - The defined ZoneOffsetPeriod or null. - - - - Creates a hash table node with all the information for this period. - We start off by finding the interval for the start of the period, and - then repeatedly check whether that interval ends after the end of the - period - at which point we're done. If not, find the next interval, create - a new node referring to that interval and the previous interval, and keep going. - - - - - Initializes a new instance of the class. - - The zone interval. - - The previous node. - - - - Represents a single <mapZone> element in the CLDR Windows zone mapping file. - - This type is immutable reference type. See the thread safety section of the user guide for more information. - - - - Identifier used for the primary territory of each Windows time zone. A zone mapping with - this territory will always have a single entry. The value of this constant is "001". - - - - - Identifier used for the "fixed offset" territory. A zone mapping with - this territory will always have a single entry. The value of this constant is "ZZ". - - - - - Gets the Windows system time zone identifier for this mapping, such as "Central Standard Time". - - - - Most Windows system time zone identifiers use the name for the "standard" part of the zone as - the overall identifier. Don't be fooled: just because a time zone includes "standard" in its identifier - doesn't mean that it doesn't observe daylight saving time. - - - - - - Gets the territory code for this mapping. - - - This is typically either "001" to indicate that it's the primary territory for this ID, or - "ZZ" to indicate a fixed-offset ID, or a different two-character capitalized code - which indicates the geographical territory. - - - - - Gets a read-only non-empty collection of TZDB zone identifiers for this mapping, such as - "America/Chicago" and "America/Matamoros" (both of which are TZDB zones associated with the "Central Standard Time" - Windows system time zone). - - - For the primary and fixed-offset territory IDs ("001" and "ZZ") this always - contains exactly one time zone ID. - - - - - Creates a new mapping entry. - - - This constructor is only public for the sake of testability. - - Windows system time zone identifier. Must not be null. - Territory code. Must not be null. - List of territory codes. Must not be null, and must not - contains null values. - - - - Private constructor to avoid unnecessary list copying (and validation) when deserializing. - - - - - Reads a mapping from a reader. - - - - - Writes this mapping to a writer. - - - - - - - The NodaTime.TimeZones.Cldr namespace contains types related to time zone information provided - by the Unicode CLDR (Common Locale Data Repository) project. - - - - - - Representation of the <windowsZones> element of CLDR supplemental data. - - - See the CLDR design proposal - for more details of the structure of the file from which data is taken. - - This type is immutable reference type. See the thread safety section of the user guide for more information. - - - - Gets the version of the Windows zones mapping data read from the original file. - - - - As with other IDs, this should largely be treated as an opaque string, but the current method for - generating this from the mapping file extracts a number from an element such as <version number="$Revision: 7825 $"/>. - This is a Subversion revision number, but that association should only be used for diagnostic curiosity, and never - assumed in code. - - - This property will never return a null value. - - - - - - Gets the TZDB version this Windows zone mapping data was created from. - - - - The CLDR mapping file usually lags behind the TZDB file somewhat - partly because the - mappings themselves don't always change when the time zone data does. For example, it's entirely - reasonable for a with a TzdbVersion of - "2013b" to be supply a WindowsZones object with a TzdbVersion of "2012f". - - - This property will never return a null value, but will be "Unknown" if the data - is loaded from the legacy resource format. - - - - - - Gets the Windows time zone database version this Windows zone mapping data was created from. - - - - At the time of this writing, this is populated (by CLDR) from the registry key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\TzVersion, - so "7dc0101" for example. - - - This property will never return a null value, but will be "Unknown" if the data - is loaded from the legacy resource format. - - - - - - Gets an immutable collection of mappings from Windows system time zones to - TZDB time zones. - - - - Each mapping consists of a single Windows time zone ID and a single - territory to potentially multiple TZDB IDs that are broadly equivalent to that Windows zone/territory - pair. - - - Mappings for a single Windows system time zone can appear multiple times - in this list, in different territories. For example, "Central Standard Time" - maps to different TZDB zones in different countries (the US, Canada, Mexico) and - even within a single territory there can be multiple zones. Every Windows system time zone covered within - this collection has a "primary" entry with a territory code of "001" (which is the value of - ) and a single corresponding TZDB zone. - - This collection is not guaranteed to cover every Windows time zone. Some zones may be unmappable - (such as "Mid-Atlantic Standard Time") and there can be a delay between a new Windows time zone being introduced - and it appearing in CLDR, ready to be used by Noda Time. (There's also bound to be a delay between it appearing - in CLDR and being used in your production system.) In practice however, you're unlikely to wish to use a time zone - which isn't covered here. - - If the data is loaded from the legacy resource format, this will only include the primary mappings. - - - - - - Gets an immutable dictionary of primary mappings, from Windows system time zone ID - to TZDB zone ID. This corresponds to the "001" territory which is present for every zone - within the mapping file. - - - - - Provides an implementation of that caches results from an - . - - - The process of loading or creating time zones may be an expensive operation. This class implements an - unlimited-size non-expiring cache over a time zone source, and adapts an implementation of the - IDateTimeZoneSource interface to an IDateTimeZoneProvider. - - - All members of this type are thread-safe as long as the underlying IDateTimeZoneSource - implementation is thread-safe. - - - - Creates a provider backed by the given . - - - Note that the source will never be consulted for requests for the fixed-offset timezones "UTC" and - "UTC+/-Offset" (a standard implementation will be returned instead). This is true even if these IDs are - advertised by the source. - - The for this provider. - violates its contract. - - - - The version ID of this provider. This is simply the returned by - the underlying source. - - - - - - - - - - - - - - - - - Exception thrown when time zone is requested from an , - but the specified ID is invalid for that provider. - - - This type only exists as TimeZoneNotFoundException doesn't exist in the Portable Class Library. - By creating an exception which derives from TimeZoneNotFoundException on the desktop version - and Exception on the PCL version, we achieve reasonable consistency while remaining - backwardly compatible with Noda Time v1 (which was desktop-only, and threw TimeZoneNotFoundException). - - Any public static members of this type are thread safe. Any instance members are not guaranteed to be thread safe. - See the thread safety section of the user guide for more information. - - - - - Creates an instance with the given message. - - The message for the exception. - - - - Chooses between two values that resolve to the same . - - - - This delegate is used by when handling an ambiguous local time, - due to clocks moving backward in a time zone transition (usually due to an autumnal daylight saving transition). - - - The returned value should be one of the two parameter values, based on the policy of the specific - implementation. Alternatively, it can throw an to implement a policy of - "reject ambiguous times." - - See the class for predefined implementations. - - Implementations of this delegate can reasonably - assume that the target local date and time really is ambiguous; the behaviour when the local date and time - can be unambiguously mapped into the target time zone (or when it's skipped) is undefined. - - - The earlier of the ambiguous matches for the original local date and time - The later of the ambiguous matches for the original local date and time - The implementation rejects requests to map ambiguous times. - - A in the target time zone; typically, one of the two input parameters. - - - - - Resolves a to a in the situation - where the requested local time does not exist in the target time zone. - - - - This delegate is used by when handling the situation where the - requested local time does not exist, due to clocks moving forward in a time zone transition (usually due to a - spring daylight saving transition). - - - The returned value will necessarily represent a different local date and time to the target one, but - the exact form of mapping is up to the delegate implementation. For example, it could return a value - as close to the target local date and time as possible, or the time immediately after the transition. - Alternatively, it can throw a to implement a policy of "reject - skipped times." - - See the class for predefined implementations. - - Implementations of this delegate can reasonably - assume that the target local date and time really is skipped; the behaviour when the local date and time - can be directly mapped into the target time zone is undefined. - - - The local date and time to map to the given time zone - The target time zone - The zone interval directly before the target local date and time would have occurred - The zone interval directly after the target local date and time would have occurred - The implementation rejects requests to map skipped times. - A in the target time zone. - - - - Resolves the result of attempting to map a local date and time to a target time zone. - - - - This delegate is consumed by and , - among others. It provides the strategy for converting a (the result of attempting - to map a local date and time to a target time zone) to a . - - See the class for predefined implementations and a way of combining - separate and values. - - The intermediate result of mapping a local time to a target time zone. - The implementation rejects requests to map ambiguous times. - The implementation rejects requests to map skipped times. - A in the target time zone. - - - - A location entry generated from the "zone.tab" file in a TZDB release. This can be used to provide - users with a choice of time zone, although it is not internationalized. - - This type is immutable reference type. See the thread safety section of the user guide for more information. - - - - Latitude in degrees; positive for North, negative for South. - - The value will be in the range [-90, 90]. - - - - Longitude in degrees; positive for East, negative for West. - - The value will be in the range [-180, 180]. - - - - The English name of the country containing the location. - - This will never be null. - - - - The ISO-3166 2-letter country code for the country containing the location. - - This will never be null. - - - - The ID of the time zone for this location. - - This will never be null, and if this mapping was fetched - from a , it will always be a valid ID within that source. - - - - - The comment (in English) for the mapping, if any. - - - This is usually used to differentiate between locations in the same country. - This will return an empty string if no comment was provided in the original data. - - - - - Creates a new location. - - This constructor is only public for the sake of testability. Non-test code should - usually obtain locations from a . - - Latitude of the location, in seconds. - Longitude of the location, in seconds. - English country name of the location, in degrees. Must not be null. - ISO-3166 country code of the location. Must not be null. - Time zone identifier of the location. Must not be null. - Optional comment. Must not be null, but may be empty. - The latitude or longitude is invalid. - - - - Implementation of which maintains the legacy "resource" format. - - - - - Reads a non-negative integer value from the stream. - - - The value must have been written by . - - The integer value from the stream. - - - - Always throws NotSupportedException - - The integer read from the stream - - - - Reads an offset value from the stream. - - - The value must have been written by . - - The offset value from the stream. - - - - Reads a long ticks value from the stream. - - - The value must have been written by LegacyDateTimeZoneWriter.WriteTicks. - - The long ticks value from the stream. - - - - Reads a boolean value from the stream. - - - The value must have been written by . - - The boolean value. - - - - Reads a string to string dictionary value from the stream. - - - The value must have been written by . - - The value from the stream. - - - - Reads an value from the stream. - - - The value must have been written by . - The parameter is ignored by this implementation. - - The previous transition written (usually for a given timezone), or null if there is - no previous transition. - The value from the stream. - - - - Reads a string value from the stream. - - - The value must have been written by . - - The string value from the stream. - - - - Reads an value from the stream. - - - The value must have been written by . - - The value from the stream. - - - - Reads a signed 16 bit integer value from the stream and returns it as an int. - - The 16 bit int value. - - - - Reads a signed 32 bit integer value from the stream and returns it as an int. - - The 32 bit int value. - - - - Reads a signed 64 bit integer value from the stream and returns it as an long. - - The 64 bit long value. - - - - - - - Implementation of which maintains the legacy "resource" format. - - - - - Constructs a LegacyDateTimeZoneWriter. - - Where to send the serialized output. - String pool to add strings to, or null for no pool - - - - Writes the given non-negative integer value to the stream. - - The value to write. - - - - Always throws NotSupportedException - - The value to write. - - - - Writes the offset value to the stream. - - The value to write. - - - - Writes the long ticks value to the stream. - - The value to write. - - - - Writes a boolean value to the stream. - - The value to write. - - - - Writes the given dictionary of string to string to the stream. - - The to write. - - - - Writes the value to the stream. - - - The parameter is ignored by this implementation. - - The previous transition written (usually for a given timezone), or null if there is - no previous transition. - The value to write. - - - - Writes the string value to the stream. - - The value to write. - - - - Writes the value to the stream. - - The value to write. - - - - Writes the given 16 bit integer value to the stream. - - The value to write. - - - - Writes the given 32 bit integer value to the stream. - - The value to write. - - - - Writes the given 64 bit integer value to the stream. - - The value to write. - - - - - - - Implementation of for the most recent version - of the "blob" format of time zone data. If the format changes, this class will be - renamed (e.g. to DateTimeZoneReaderV0) and the new implementation will replace it. - - - - - Reads a non-negative integer value from the stream. - - - The value must have been written by . - - The integer value from the stream. - - - - Reads a (possibly-negative) integer value from the stream. - - - The value must have been written by . - - The integer value from the stream. - - - - Reads a base-128 varint value from the stream. - - - The value must have been written by DateTimeZoneWriter.WriteVarint, which - documents the format. - - The integer value from the stream. - - - - Reads an offset value from the stream. - - - The value must have been written by . - - The offset value from the stream. - - - - Reads a string to string dictionary value from the stream. - - - The value must have been written by . - - The value from the stream. - - - - Reads an instant representing a zone interval transition from the stream. - - - The value must have been written by . - - The previous transition written (usually for a given timezone), or null if there is - no previous transition. - The instant read from the stream - - - - Reads a string value from the stream. - - - The value must have been written by . - - The string value from the stream. - - - - Reads a signed 16 bit integer value from the stream and returns it as an int. - - The 16 bit int value. - - - - Reads a signed 32 bit integer value from the stream and returns it as an int. - - The 32 bit int value. - - - - Reads a signed 64 bit integer value from the stream and returns it as an long. - - The 64 bit long value. - - - - Reads a signed 8 bit integer value from the stream and returns it as an int. - - The 8 bit int value. - The data in the stream has been exhausted. - - - - - Implementation of for the most recent version - of the "blob" format of time zone data. If the format changes, this class will be - renamed (e.g. to DateTimeZoneWriterV0) and the new implementation will replace it. - - - - The instant to use as an 'epoch' when writing out a number of minutes-since-epoch. - - - The marker value representing the beginning of time. - - - The marker value representing the end of time. - - - The marker value representing an instant as a fixed 64-bit number of ticks. - - - The minimum varint value that represents an number of hours-since-previous. - Values below value are reserved for markers. - - - The minimum varint value that represents an number of minutes since an epoch. - Values below this are interpreted as hours-since-previous (for a range of about 240 years), - rather than minutes-since-epoch (for a range of about 4000 years) - This choice is somewhat arbitrary, though it results in hour values always taking 2 (or - occasionally 3) bytes when encoded as a varint, while minute values take 4 (or conceivably 5). - - - - Constructs a DateTimeZoneWriter. - - Where to send the serialized output. - String pool to add strings to, or null for no pool - - - - Writes the given non-negative integer value to the stream. - - The value to write. - - - - Writes the given (possibly-negative) integer value to the stream. - - - Unlike , this can encode negative numbers. It does, however, use a slightly less - efficient encoding for positive numbers. - - The value to write. - - - - Writes the given integer value to the stream as a base-128 varint. - - - The format is a simple 7-bit encoding: while the value is greater than 127 (i.e. - has more than 7 significant bits) we repeatedly write the least-significant 7 bits - with the top bit of the byte set as a continuation bit, then shift the value right - 7 bits. - - The value to write. - - - - Writes the offset value to the stream. - - The value to write. - - - - Writes the given dictionary of string to string to the stream. - - The to write. - - - - Writes the string value to the stream. - - The value to write. - - - - Writes the given 16 bit integer value to the stream. - - The value to write. - - - - Writes the given 32 bit integer value to the stream. - - The value to write. - - - - Writes the given 64 bit integer value to the stream. - - The value to write. - - - - - - - Interface for reading time-related data from a binary stream. - This is similar to , but heavily - oriented towards our use cases. - - - - - Reads a non-negative integer from the stream, which must have been written - by a call to . - - The integer read from the stream - The data was invalid. - The stream could not be read. - - - - Reads a non-negative integer from the stream, which must have been written - by a call to . - - The integer read from the stream - The data was invalid. - The stream could not be read. - - - - Reads a string from the stream. - - The string read from the stream; will not be null - The data was invalid. - The stream could not be read. - - - - Reads a signed 8 bit integer value from the stream and returns it as an int. - - The 8 bit int value. - The data in the stream has been exhausted. - - - - Reads an offset from the stream. - - The offset read from the stream - The data was invalid. - The stream could not be read. - - - - Reads an instant representing a zone interval transition from the stream. - - The previous transition written (usually for a given timezone), or null if there is - no previous transition. - The instant read from the stream - The data was invalid. - The stream could not be read. - - - - Reads a string-to-string dictionary from the stream. - - The dictionary read from the stream - The data was invalid. - The stream could not be read. - - - - Interface for writing time-related data to a binary stream. - This is similar to , but heavily - oriented towards our use cases. - - - It is expected that the code reading data written by an implementation - will be able to identify which implementation to use. Initially we have two - implementations: one for reading the data from the legacy resource format, - and one for reading the data from the first version of the newer blob format. - When the legacy resource format is retired, it's possible that we will only - have one implementation moving forward - but the interface will allow us to - evolve the details of the binary structure independently of the code in the - time zone implementations which knows how to write/read in terms of this interface - and . - - - - - - Writes a non-negative integer to the stream. This is optimized towards - cases where most values will be small. - - The integer to write to the stream. - The value couldn't be written to the stream. - is negative. - - - - Writes a possibly-negative integer to the stream. This is optimized for - values of small magnitudes. - - The integer to write to the stream. - The value couldn't be written to the stream. - - - - Writes a string to the stream. - - Other than the legacy resource writer, callers can reasonably expect that - these values will be pooled in some fashion, so should not apply their own pooling. - The string to write to the stream. - The value couldn't be written to the stream. - - - - Writes an offset to the stream. - - The offset to write to the stream. - The value couldn't be written to the stream. - - - - Writes an instant representing a zone interval transition to the stream. - - - This method takes a previously-written transition. Depending on the implementation, this value may be - required by the reader in order to reconstruct the next transition, so it should be deterministic for any - given value. - - The previous transition written (usually for a given timezone), or null if there is - no previous transition. - The transition to write to the stream. - The value couldn't be written to the stream. - - - - Writes a string-to-string dictionary to the stream. - - - The value couldn't be written to the stream. - - - - Writes the given 8 bit integer value to the stream. - - The value to write. - - - - Provides the raw data exposed by . It would - be simpler to use inheritance in this case with static factory methods, but - there are already public constructors exposed - so to delegate to different - implementations, we need a separate hierarchy :( - - - - - Returns the TZDB version string. - - - - - Returns the TZDB ID dictionary (alias to canonical ID). This needn't be read-only; it won't be - exposed directly. - - - - - Returns the Windows mapping dictionary. (As the type is immutable, it can be exposed directly - to callers.) - - - - - Returns the zone locations for the source, or null if no location data is available. - This needn't be read-only; it won't be exposed directly. - - - - - Creates the for the given canonical ID, which will definitely - be one of the values of the TzdbAliases dictionary. - - ID for the returned zone, which may be an alias. - Canonical ID for zone data - - - - Additional mappings from Windows standard name to TZDB ID. Primarily used in - the PCL build, where we can't get at the system ID. Returns null when no data - is available (legacy resource format). - - - - - - - - - - - - - - - - - - - - - - - Mutable builder class used during parsing. - - - - - An unparsed field within a stream. - - - - - Creates a new read-only stream over the data for this field. - - - - - Enumeration of the fields which can occur in a TZDB stream file. - This enables the file to be self-describing to a reasonable extent. - - - - - String pool. Format is: number of strings (WriteCount) followed by that many string values. - The indexes into the resultant list are used for other strings in the file, in some fields. - - - - - Repeated field of time zones. Format is: zone ID, then zone as written by DateTimeZoneWriter. - - - - - Single field giving the version of the TZDB source data. A string value which does *not* use the string pool. - - - - - Single field giving the mapping of ID to canonical ID, as written by DateTimeZoneWriter.WriteDictionary. - - - - - Single field containing mapping data as written by WindowsZones.Write. - - - - - Single field giving the mapping of Windows StandardName to TZDB canonical ID, - for time zones where TimeZoneInfo.Id != TimeZoneInfo.StandardName, - as written by DateTimeZoneWriter.WriteDictionary. - - - - - Single field providing all zone locations. The format is simply a count, and then that many copies of - TzdbZoneLocation data. - - - - - The core part of a DateTimeZone: mapping an Instant to an Interval. - Separating this out into an interface allows for flexible caching. - - - Benchmarking shows that a delegate may be slightly faster here, but the difference - isn't very significant even for very fast calls (cache hits). The interface ends up - feeling slightly cleaner elsewhere in the code. - - - - - - The NodaTime.TimeZones namespace contains types related to time zones beyond the core - class in the NodaTime namespace. Most users will have no need - to refer to the types in this namespace. - - - - - - Commonly-used implementations of the delegates used in resolving a to a - , and a method to combine two "partial" resolvers into a full one. - - - - This class contains predefined implementations of , - , and , along with - , which produces a ZoneLocalMappingResolver from instances of the - other two. - - - All members of this class are thread-safe, as are the values returned by them. - - - - An which returns the earlier of the two matching times. - - - - - An which returns the later of the two matching times. - - - - - An which simply throws an . - - - - - A which returns the final tick of the time zone interval - before the "gap". - - - - - A which returns the first tick of the time zone interval - after the "gap". - - - - - A which simply throws a . - - - - - A which only ever succeeds in the (usual) case where the result - of the mapping is unambiguous. - - - If the mapping is ambiguous or skipped, this throws or - , as appropriate. This resolver combines - and . - - - - - - A which never throws an exception due to ambiguity or skipped time. - - - Ambiguity is handled by returning the later occurrence, and skipped times are mapped to the start of the zone interval - after the gap. This resolver combines and . - - - - - - Combines an and a to create a - . - - - The ZoneLocalMappingResolver created by this method operates in the obvious way: unambiguous mappings - are returned directly, ambiguous mappings are delegated to the given AmbiguousTimeResolver, and - "skipped" mappings are delegated to the given SkippedTimeResolver. - - Resolver to use for ambiguous mappings. - Resolver to use for "skipped" mappings. - The logical combination of the two resolvers. - - - - Exception thrown to indicate that a time zone source has violated the contract of . - This exception is primarily intended to be thrown from , and only in the face of a buggy - source; user code should not usually need to be aware of this or catch it. - - Any public static members of this type are thread safe. Any instance members are not guaranteed to be thread safe. - See the thread safety section of the user guide for more information. - - - - - Creates a new instance with the given message. - - The message for the exception. - - - - A transition between two offsets, usually for daylight saving reasons. This type only knows about - the old offset, the new offset, and the transition point. - - - This type is an immutable value type. See the thread safety section of the user guide for more information. - - - - The offset from the time when this transition occurs until the next transition. - - - - - Implements the operator == (equality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are equal to each other, otherwise false. - - - - Implements the operator != (inequality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are not equal to each other, otherwise false. - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Provides a basic daylight savings time zone. A DST time zone has a simple recurrence - where an extra offset is applied between two dates of a year. - - - IMPORTANT: This class *accepts* recurrences which start from a particular year - rather than being infinite back to the start of time, but *treats* them as if - they were infinite. This makes various calculations easier, but this zone should - only be used as part of a PrecalculatedDateTimeZone which will only ask it for - values within the right portion of the timeline. - - - - - Initializes a new instance of the class. - - - At least one of the recurrences (it doesn't matter which) must be a "standard", i.e. not have any savings - applied. The other may still not have any savings (e.g. for America/Resolute) or (for BCL compatibility) may - even have negative daylight savings. - - The id. - The standard offset. - The start recurrence. - The end recurrence. - - - - Gets the zone interval for the given instant. - - The Instant to test. - The ZoneInterval in effect at the given instant. - The instant falls outside the bounds - of the recurrence rules of the zone. - - - - Finds the recurrence containing the given instant, if any. - - The recurrence containing the given instant, or null if - the instant occurs before the start of the earlier recurrence. - - - - Returns the transition occurring strictly after the specified instant - - The instant after which to consider transitions. - - - - Returns the transition occurring strictly before the specified instant. - - The instant before which to consider transitions. - - The instant of the previous transition, or null if there are no further transitions. - - - - - Returns the offset from UTC, where a positive duration indicates that local time is later - than UTC. In other words, local time = UTC + offset. - - The instant for which to calculate the offset. - - The offset from UTC at the specified instant. - - - - - Writes the time zone to the specified writer. - - The writer to write to. - - - - Writes the time zone to the specified legacy writer. - - The writer to write to. - - - - Basic implementation that has a fixed name key and offset i.e. - no daylight savings. - - This type is immutable reference type. See the thread safety section of the user guide for more information. - - - - Creates a new fixed time zone. - - The from UTC. - - - - Initializes a new instance of the class. - - The id. - The offset. - - - - Makes the id for this time zone. The format is "UTC+/-Offset". - - The offset. - The generated id string. - - - - Returns a fixed time zone for the given ID, which must be "UTC" or "UTC[offset]" where "[offset]" can be parsed - using the "general" offset pattern. - - ID - The parsed time zone, or null if the ID doesn't match. - - - - Returns the fixed offset for this time zone. - - The fixed offset for this time zone. - - - - Gets the zone interval for the given instant. This implementation always returns the same interval. - - - - - Gets the zone interval pair for the given instant. This implementation always returns the same unambiguous interval pair. - - - - - Returns the offset from UTC, where a positive duration indicates that local time is later - than UTC. In other words, local time = UTC + offset. - - The instant for which to calculate the offset. - - The offset from UTC at the specified instant. - - - - - Writes the time zone to the specified writer. - - The writer. - - - - Reads a fixed time zone from the specified reader. - - The reader. - The id. - The fixed time zone. - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Provides the interface for objects that can retrieve time zone definitions given an ID. - - - - The interface presumes that the available time zones are static; there is no mechanism for - updating the list of available time zones. Any time zone ID that is returned in - must be resolved by for the life of the source. - - - Implementations need not cache time zones or the available time zone IDs. - Caching is typically provided by , which most consumers should use instead of - consuming directly in order to get better performance. - - - It is expected that any exceptions thrown are implementation-specific; nothing is explicitly - specified in the interface. Typically this would be unusual to the point that callers would not - try to catch them; any implementation which may break in ways that are sensible to catch should advertise - this clearly, so that clients will know to handle the exceptions appropriately. No wrapper exception - type is provided by Noda Time to handle this situation, and code in Noda Time does not try to catch - such exceptions. - - - Implementations are not required to be thread-safe. - - - - Returns an unordered enumeration of the IDs available from this source. - - - - Every value in this enumeration must return a valid time zone from for the life of the source. - The enumeration may be empty, but must not be null, and must not contain any elements which are null. It - should not contain duplicates: this is not enforced, and while it may not have a significant impact on - clients in some cases, it is generally unfriendly. The built-in implementations never return duplicates. - - - The source is not required to provide the IDs in any particular order, although they should be distinct. - - - Note that this list may optionally contain any of the fixed-offset timezones (with IDs "UTC" and - "UTC+/-Offset"), but there is no requirement they be included. - - - The IDs available from this source. - - - - Returns an appropriate version ID for diagnostic purposes, which must not be null. - This doesn't have any specific format; it's solely for diagnostic purposes. - The included sources return strings of the format "source identifier: source version" indicating where the - information comes from and which version of the source information has been loaded. - - - - - Returns the time zone definition associated with the given ID. - - - - Note that this is permitted to return a that has a different ID to that - requested, if the ID provided is an alias. - - - Note also that this method is not required to return the same instance for - successive requests for the same ID; however, all instances returned for a given ID must compare as equal. - - - It is advised that sources should document their behaviour regarding any fixed-offset timezones - (i.e. "UTC" and "UTC+/-Offset") that are included in the list returned by . - (These IDs will not be requested by , but any users calling - into the source directly may care.) - - - The source need not attempt to cache time zones; caching is typically provided by - . - - - The ID of the time zone to return. This must be one of the IDs - returned by . - The for the given ID. - is not supported by this source. - - - - Returns this source's corresponding ID for the given BCL time zone. - - The BCL time zone, which must be a known system time zone. - - The ID for the given system time zone for this source, or null if the system time - zone has no mapping in this source. - - - - - Equality comparer for time zones, comparing specific aspects of the zone intervals within - a time zone for a specific interval of the time line. - - - The default behaviour of this comparator is to consider two time zones to be equal if they share the same wall - offsets at all points within a given time interval, regardless of other aspects of each - within the two time zones. This behaviour can be changed using the - method. - - - - - Options to use when comparing time zones for equality. Each option makes the comparison more restrictive. - - - - By default, the comparer only compares the wall offset (total of standard offset and any daylight saving offset) - at every instant within the interval over which the comparer operates. In practice, this is done by comparing each - which includes an instant within the interval (using ). - For most purposes, this is all that's required: from the simple perspective of a time zone being just a function from instants to local time, - the default option of effectively checks that the function gives the same result across the two time - zones being compared, for any given instant within the interval. - - - It's possible for a time zone to have a transition from one ZoneInterval to another which doesn't adjust the offset: it - might just change the name, or the balance between standard offset to daylight saving offset. (As an example, at midnight local - time on October 27th 1968, the Europe/London time zone went from a standard offset of 0 and a daylight saving offset of 1 hour - to a standard offset of 1 and a daylight saving offset of 0... which left the clocks unchanged.) This transition is irrelevant - to the default options, so the two zone intervals involved are effectively coalesced. - - - The options available change what sort of comparison is performed - which can also change which zone intervals can be coalesced. For - example, by specifying just the option, you would indicate that even though you don't care about the name within a zone - interval or how the wall offset is calculated, you do care about the fact that there was a transition at all, and when it occurred. - With that option enabled, zone intervals are never coalesced and the transition points within the operating interval are checked. - - Similarly, the option is the only one where instants outside the operating interval are - relevant. For example, consider a comparer which operates over the interval [2000-01-01T00:00:00Z, 2011-01-01T00:00:00Z). Normally, - anything that happens before the year 2000 (UTC) would be irrelevant - but with this option enabled, the transitions of the first and last zone - intervals are part of the comparison... so if one time zone has a zone interval 1999-09-01T00:00:00Z to 2000-03-01T00:00:00Z and the other has - a zone interval 1999-10-15T00:00:00Z to 2000-03-01T00:00:Z, the two zones would be considered unequal, despite the fact that the only instants observing - the difference occur outside the operating interval. - - - - - - The default comparison, which only cares about the wall offset at any particular - instant, within the interval of the comparer. In other words, if - returns the same value for all instants in the interval, the comparer will consider the zones to be equal. - - - - - Instead of only comparing wall offsets, the standard/savings split is also considered. So when this - option is used, two zones which both have a wall offset of +2 at one instant would be considered - unequal if one of those offsets was +1 standard, +1 savings and the other was +2 standard with no daylight - saving. - - - - - Compare the names of zone intervals as well as offsets. - - - - - This option prevents adjacent zone intervals from being coalesced, even if they are otherwise considered - equivalent according to other options. - - - - - Includes the transitions into the first zone interval and out of the - last zone interval as part of the comparison, even if they do not affect - the offset or name for any instant within the operating interval. - - - - - The combination of all available match options. - - - - - Checks whether the given set of options includes the candidate one. This would be an extension method, but - that causes problems on Mono at the moment. - - - - - Returns the interval over which this comparer operates. - - - - - Returns the options used by this comparer. - - - - - Creates a new comparer for the given interval, with the given comparison options. - - The interval within the time line to use for comparisons. - The options to use when comparing time zones. - The specified options are invalid. - - - - Returns a for the given interval with the default options. - - - The default behaviour of this comparator is to consider two time zones to be equal if they share the same wall - offsets at all points within a given interval. - To specify non-default options, call the method on the result - of this method. - The interval over which to compare time zones. - A ZoneEqualityComparer for the given interval with the default options. - - - - Returns a comparer operating over the same interval as this one, but with the given - set of options. - - - This method does not modify the comparer on which it's called. - - New set of options, which must consist of flags defined within the enum. - The specified options are invalid. - A comparer operating over the same interval as this one, but with the given set of options. - - - - Compares two time zones for equality according to the options and interval provided to this comparer. - - The first to compare. - The second to compare. - true if the specified time zones are equal under the options and interval of this comparer; otherwise, false. - - - - Returns a hash code for the specified time zone. - - - The hash code generated by any instance of ZoneEqualityComparer will be equal to the hash code - generated by any other instance constructed with the same options and interval, for the same time zone (or equal ones). - Two instances of ZoneEqualityComparer with different options or intervals may (but may not) produce - different hash codes for the same zone. - - The time zone to compute a hash code for. - A hash code for the specified object. - - - - Compares the parts of two zone intervals which are deemed "interesting" by the options. - The wall offset is always compared, regardless of options, but the start/end points are - never compared. - - - - - Represents a range of time for which a particular Offset applies. - - This type is an immutable reference type. See the thread safety section of the user guide for more information. - - - - Initializes a new instance of the class. - - The name of this offset period (e.g. PST or PDT). - The first that the applies. - The last (exclusive) that the applies. - The from UTC for this period including any daylight savings. - The daylight savings contribution to the offset. - If >= . - - - - Returns a copy of this zone interval, but with the given start instant. - - - - - Returns a copy of this zone interval, but with the given end instant. - - - - - Gets the standard offset for this period. This is the offset without any daylight savings - contributions. - - - This is effectively Offset - Savings. - - The base Offset. - - - - Gets the duration of this period. - - - This is effectively End - Start. - - The Duration of this period. - - - - Gets the last Instant (exclusive) that the Offset applies. - - The last Instant (exclusive) that the Offset applies. - - - - Gets the end time as a LocalInstant. - - - This is effectively End + Offset. - - The ending LocalInstant. - - - - Gets the start time as a LocalInstant. - - - This is effectively Start + Offset. - - The starting LocalInstant. - - - - Returns the local start time of the interval, as LocalDateTime - in the ISO calendar. - - - - - Returns the local start time of the interval, as LocalDateTime - in the ISO calendar. This does not include any daylight saving - - - - - Gets the name of this offset period (e.g. PST or PDT). - - The name of this offset period (e.g. PST or PDT). - - - - Gets the offset from UTC for this period. This includes any daylight savings value. - - The offset from UTC for this period. - - - - Gets the daylight savings value for this period. - - The savings value. - - - - Gets the first Instant that the Offset applies. - - The first Instant that the Offset applies. - - - - Determines whether this period contains the given Instant in its range. - - - Usually this is half-open, i.e. the end is exclusive, but an interval with an end point of "the end of time" - is deemed to be inclusive at the end. - - The instant to test. - - true if this period contains the given Instant in its range; otherwise, false. - - - - - Determines whether this period contains the given LocalInstant in its range. - - The local instant to test. - - true if this period contains the given LocalInstant in its range; otherwise, false. - - - - - Indicates whether the current object is equal to another object of the same type. - - - true if the current object is equal to the parameter; otherwise, false. - - An object to compare with this object. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . - 2 - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - 2 - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - A pair of possibly null ZoneInterval values. This is the result of fetching a time zone - interval by LocalInstant, as the result could be 0, 1 or 2 matching ZoneIntervals. - This is a sort of light-weight version of ZoneLocalMapping, used when we won't need to - know the details of the gaps and it's handy to use a struct instead of creating a new object. - - - - - The earlier of the two zone intervals matching the original local instant, or null - if there were no matches. If there is a single match (the most common case) this - value will be non-null, and LateInterval will be null. - - - - - The later of the two zone intervals matching the original local instant, or null - if there were no matches. If there is a single match (the most common case) this - value will be null, and EarlyInterval will be non-null. - - - - - Returns the number of intervals contained within this pair - 0 for a "gap", - 1 for an unambiguous match, 2 for an ambiguous match. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . - 2 - - - - Indicates whether the current object is equal to another object of the same type. - - - true if the current object is equal to the parameter; otherwise, false. - - An object to compare with this object. - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - 2 - - - - The result of mapping a within a time zone, i.e. finding out - at what "global" time the "local" time occurred. - - - - This class is used as the return type of . It allows for - finely-grained handling of the three possible results: - - - - Unambiguous mapping - The local time occurs exactly once in the target time zone. - - - Ambiguous mapping - - The local time occurs twice in the target time zone, due to the offset from UTC - changing. This usually occurs for an autumnal daylight saving transition, where the clocks - are put back by an hour. If the clocks change from 2am to 1am for example, then 1:30am occurs - twice - once before the transition and once afterwards. - - - - Impossible mapping - - The local time does not occur at all in the target time zone, due to the offset from UTC - changing. This usually occurs for a vernal (spring-time) daylight saving transition, where the clocks - are put forward by an hour. If the clocks change from 1am to 2am for example, then 1:30am is - skipped entirely. - - - - - This type is an immutable reference type. See the thread safety section of the user guide for more information. - - - - Returns the number of results within this mapping: the number of distinct - values which map to the original . - - - - - Returns the in which this mapping was performed. - - - - - Returns the which was mapped with in the time zone. - - - - - Returns the earlier within this mapping. For unambiguous - mappings, this is the same as ; for ambiguous mappings, - this is the interval during which the mapped local time first occurs; for impossible - mappings, this is the interval before which the mapped local time occurs. - - - - - Returns the later within this mapping. For unambiguous - mappings, this is the same as ; for ambiguous mappings, - this is the interval during which the mapped local time last occurs; for impossible - mappings, this is the interval after which the mapped local time occurs. - - - - - Returns the single which maps to the original - in the mapped . - - The local date/time was skipped in the time zone. - The local date/time was ambiguous in the time zone. - The unambiguous result of mapping the local date/time in the time zone. - - - - Returns a which maps to the original - in the mapped : either the single result if the mapping is unambiguous, - or the earlier result if the local date/time occurs twice in the time zone due to a time zone - offset change such as an autumnal daylight saving transition. - - The local date/time was skipped in the time zone. - The unambiguous result of mapping a local date/time in a time zone. - - - - Returns a which maps to the original - in the mapped : either the single result if the mapping is unambiguous, - or the later result if the local date/time occurs twice in the time zone due to a time zone - offset change such as an autumnal daylight saving transition. - - The local date/time was skipped in the time zone. - The unambiguous result of mapping a local date/time in a time zone. - - - - Defines an offset within a year as an expression that can be used to reference multiple - years. - - - - A year offset defines a way of determining an offset into a year based on certain criteria. - The most basic is the month of the year and the day of the month. If only these two are - supplied then the offset is always the same day of each year. The only exception is if the - day is February 29th, then it only refers to those years that have a February 29th. - - - If the day of the week is specified then the offset determined by the month and day are - adjusted to the nearest day that falls on the given day of the week. If the month and day - fall on that day of the week then nothing changes. Otherwise the offset is moved forward or - backward up to 6 days to make the day fall on the correct day of the week. The direction the - offset is moved is determined by the property. - - - Finally the property deterines whether the value - is added to the calculated offset to generate an offset within the day. - - - Immutable, thread safe - - - - - - An offset that specifies the beginning of the year. - - - - - Initializes a new instance of the class. - - The transition mode. - The month year offset. - The day of month. Negatives count from end of month. - The day of week. 0 means not set. - if set to true [advance]. - The tick within the day. - - - - Initializes a new instance of the class. - - The transition mode. - The month year offset. - The day of month. Negatives count from end of month. - The day of week. 0 means not set. - if set to true [advance]. - The time of day at which the transition occurs. - Whether to add an extra day (for 24:00 handling). - - - - Verifies the input value against the valid range of the calendar field. - - - If this becomes more widely required, move to Preconditions. - - The minimum valid value. - The maximum valid value (inclusive). - The name of the field for the error message. - The value to check. - if set to true all the range of value to be the negative as well. - If the given value is not in the valid range of the given calendar field. - - - - Gets the method by which offsets are added to Instants to get LocalInstants. - - - - - Gets a value indicating whether [advance day of week]. - - - - - Gets the time of day when the rule takes effect. - - - - - Indicates whether the current object is equal to another object of the same type. - - An object to compare with this object. - - true if the current object is equal to the parameter; otherwise, false. - - - - - Normalizes the transition mode characater. - - The character to normalize. - The . - - - - Returns an that represents the point in the given year that this - object defines. If the exact point is not valid then the nearest point that matches the - definition is returned. - - The year to calculate for. - The standard offset. - The daylight savings adjustment. - The of the point in the given year. - - - - Returns the given instant adjusted one year forward taking into account leap years and other - adjustments like day of week. - - The instant to adjust. - The standard offset. - The daylight savings adjustment. - The adjusted . - - - - Returns the given instant adjusted one year backward taking into account leap years and other - adjustments like day of week. - - The instant to adjust. - The standard offset. - The daylight savings adjustment. - The adjusted . - - - - Writes this object to the given . - - Where to send the output. - - - - Writes this object to the given . - - Where to send the output. - - - - Returns the offset to use for this object's . - - The standard offset. - The daylight savings adjustment. - The base time offset as a . - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Most time zones have a relatively small set of transitions at their start until they finally - settle down to either a fixed time zone or a daylight savings time zone. This provides the - container for the initial zone intervals and a pointer to the time zone that handles all of - the rest until the end of time. - - - - - The first instant covered by the tail zone, or Instant.MaxValue if there's no tail zone. - - - - - Initializes a new instance of the class. - - The id. - The periods. - The tail zone. - - - - Validates that all the periods before the tail zone make sense. We have to start at the beginning of time, - and then have adjoining periods. This is only called in the constructors. - - This is only called from the constructors, but is internal to make it easier to test. - The periods specified are invalid. - - - - Gets the zone offset period for the given instant. - - The Instant to find. - The ZoneInterval including the given instant. - - - - Returns true if this time zone is worth caching. Small time zones or time zones with - lots of quick changes do not work well with . - - true if this instance is cachable; otherwise, false. - - - - Writes the time zone to the specified writer. - - The writer to write to. - - - - Reads a time zone from the specified reader. - - The reader. - The id. - The time zone. - - - - Writes the time zone to the specified writer. - - The writer to write to. - - - - Reads a time zone from the specified reader. - - The reader. - The id. - The time zone. - - - - Extends with a name and savings. - - - - This represents a recurring transition from or to a daylight savings time. The name is the - name of the time zone during this period (e.g. PST or PDT). The savings is usually 0 or the - daylight offset. This is also used to support some of the tricky transitions that occurred - before that calendars were "standardized." - - - Immutable, thread safe. - - - - - - Initializes a new instance of the class. - - The name of the time zone period e.g. PST. - The savings for this period. - The year offset of when this period starts in a year. - The first year in which this recurrence is valid - The last year in which this recurrence is valid - - - - Returns a new recurrence which has the same values as this, but a different name. - - - - - Indicates whether the current object is equal to another object of the same type. - - An object to compare with this object. - - true if the current object is equal to the parameter; - otherwise, false. - - - - - Returns the given instant adjusted one year forward taking into account leap years and other - adjustments like day of week. - - - If the given instant is before the starting year, the year of the given instant is - adjusted to the beginning of the starting year. The first transition after the - adjusted instant is determined. If the next adjustment is after the ending year, this - method returns null; otherwise the next transition is returned. - - The lower bound for the next transition. - The standard offset. - The savings adjustment at the given Instant. - The next transition, or null if there is no next transition. - - - - Returns the given instant adjusted one year backward taking into account leap years and other - adjustments like day of week. - - The lower bound for the next trasnition. - The standard offset. - The savings adjustment at the given Instant. - The previous transition, or null if there is no previous transition. - - - - Piggy-backs onto Next, but fails with an InvalidOperationException if there's no such transition. - - - - - Piggy-backs onto Previous, but fails with a descriptive InvalidOperationException if there's no such transition. - - - - - Writes this object to the given . - - Where to send the output. - - - - Reads a recurrence from the specified reader. - - The reader. - The recurrence read from the reader. - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Returns either "this" (if this zone recurrence already has a from year of int.MinValue) - or a new zone recurrence which is identical but with a from year of int.MinValue. - - - - - Returns either "this" (if this zone recurrence is already infinite) - or a new zone recurrence which is identical but with a from year of int.MinValue - and an end year of int.MaxValue. - - - - - Specifies how transitions are calculated. Whether relative to UTC, the time zones standard - offset, or the wall (or daylight savings) offset. - - - - - Calculate transitions against UTC. - - - - - Calculate transitions against wall offset. - - - - - Calculate transitions against standard offset. - - - - - Provides an implementation of that loads data originating from the - tz database (also known as the IANA Time Zone database, or zoneinfo - or Olson database). - - - All calls to for fixed-offset IDs advertised by the source (i.e. "UTC" and "UTC+/-Offset") - will return zones equal to those returned by . - - This type is immutable reference type. See the thread safety section of the user guide for more information. - - - - The initialised from resources within the NodaTime assembly. - - - - - Original source data - we delegate to this to create actual DateTimeZone instances, - and for windows mappings. - - - - - Map from ID (possibly an alias) to canonical ID. This is a read-only wrapper, - and can be returned directly to clients. - - - - - Lookup from canonical ID to aliases. - - - - - Composite version ID including TZDB and Windows mapping version strings. - - - - - List of zone locations, if any. This is a read-only wrapper, and can be - returned directly to clients. It may be null, if the underlying data source - has no location data. - - - - - Creates an instance from a stream in the custom Noda Time format. The stream must be readable. - - - - The stream is not closed by this method, but will be read from - without rewinding. A successful call will read the stream to the end. - - - See the user guide for instructions on how to generate an updated time zone database file from a copy of the - (textual) tz database. - - - The stream containing time zone data - A TzdbDateTimeZoneSource providing information from the given stream. - The stream contains invalid time zone data, or data which cannot - be read by this version of Noda Time. - Reading from the stream failed. - The supplied stream doesn't support reading. - - - - - - - - - - - - This source returns a string such as "TZDB: 2013b (mapping: 8274)" corresponding to the versions of the tz - database and the CLDR Windows zones mapping file. - - - Note that there is no need to parse this string to extract any of the above information, as it is available - directly from the and properties. - - - - - - The BCL time zone, which must be a known system time zone. - - - - In cases where we can't get a zone mapping, either because we haven't kept - up to date with the standard names or because the system language isn't English, - try to work out the TZDB mapping by the transitions within the next few years. - We only do this for the PCL, where we can't ask a TimeZoneInfo for its ID. Unfortunately - this means we may sometimes return a mapping for zones which shouldn't be mapped at all, but that's - probably okay and we return null if we don't get a 70% hit rate anyway. We look at all - transitions in all primary mappings for the next year. - Heuristically, this seems to be good enough to get the right results in most cases. - - This method is not PCL-only as we would like to test it frequently. It will - never actually be called in the non-PCL release though. - Zone to resolve in a best-effort fashion. - - - - Returns a lookup from canonical time zone ID (e.g. "Europe/London") to a group of aliases for that time zone - (e.g. {"Europe/Belfast", "Europe/Guernsey", "Europe/Jersey", "Europe/Isle_of_Man", "GB", "GB-Eire"}). - - - The group of values for a key never contains the canonical ID, only aliases. Any time zone - ID which is itself an alias or has no aliases linking to it will not be present in the lookup. - The aliases within a group are returned in alphabetical (ordinal) order. - - A lookup from canonical ID to the aliases of that ID. - - - - Returns a read-only map from time zone ID to the canonical ID. For example, the key "Europe/Jersey" - would be associated with the value "Europe/London". - - - This map contains an entry for every ID returned by , where - canonical IDs map to themselves. - The returned map is read-only; any attempts to call a mutating method will throw - . - - A map from time zone ID to the canonical ID. - - - - Returns a read-only list of zone locations known to this source. - - - - Every zone location's time zone ID is guaranteed to be valid within this source (assuming the source - has been validated). - - - The legacy resource format does not include location information, - and this property will throw an exception if the information is requested. It is expected - that callers who wish to use newer features will not be attempting to use legacy formats - for time zone data. - - - This is a legacy resource-based data source which does - not include location information. - - - - Returns just the TZDB version (e.g. "2013a") of the source data. - - - - - Gets the Windows time zone mapping information provided in the CLDR - supplemental "windowsZones.xml" file. - - - - - Validates that the data within this source is consistent with itself. - - - Source data is not validated automatically when it's loaded, but any source - loaded from data produced by NodaTime.TzdbCompiler (including the data shipped with Noda Time) - will already have been validated via this method when it was originally produced. This method should - only normally be called explicitly if you have data from a source you're unsure of. - - The source data is invalid. The source may not function - correctly. - - - - A date and time in a particular calendar system. A LocalDateTime value does not represent an - instant on the time line, because it has no associated time zone: "November 12th 2009 7pm, ISO calendar" - occurred at different instants for different people around the world. - - - - This type defaults to using the IsoCalendarSystem unless a different calendar system is - specified. - - Comparisons of values can be handled in a way which is either calendar-sensitive or calendar-insensitive. - Noda Time implements all the operators (and the method) such that all operators other than - will return false if asked to compare two values in different calendar systems. - - - However, the method (implementing ) is calendar-insensitive; it compares the two - values historically in terms of when they actually occurred, as if they're both converted to some "neutral" calendar system first. - - - It's unclear at the time of this writing whether this is the most appropriate approach, and it may change in future versions. In general, - it would be a good idea for users to avoid comparing dates in different calendar systems, and indeed most users are unlikely to ever explicitly - consider which calendar system they're working in anyway. - - - This type is an immutable value type. See the thread safety section of the user guide for more information. - - - - Initializes a new instance of the struct using the ISO - calendar system. - - The local instant. - The resulting date/time. - - - - Initializes a new instance of the struct. - - The local instant. - The calendar system. - The resulting date/time. - - - - Initializes a new instance of the struct using the ISO calendar system. - - The year. This is the "absolute year", - so a value of 0 means 1 BC, for example. - The month of year. - The day of month. - The hour. - The minute. - The resulting date/time. - The parameters do not form a valid date/time. - - - - Initializes a new instance of the struct. - - The year. This is the "absolute year", so, for - the ISO calendar, a value of 0 means 1 BC, for example. - The month of year. - The day of month. - The hour. - The minute. - The calendar. - The resulting date/time. - The parameters do not form a valid date/time. - - - - Initializes a new instance of the struct using the ISO calendar system. - - The year. This is the "absolute year", - so a value of 0 means 1 BC, for example. - The month of year. - The day of month. - The hour. - The minute. - The second. - The resulting date/time. - The parameters do not form a valid date/time. - - - - Initializes a new instance of the struct. - - The year. This is the "absolute year", so, for - the ISO calendar, a value of 0 means 1 BC, for example. - The month of year. - The day of month. - The hour. - The minute. - The second. - The calendar. - The resulting date/time. - The parameters do not form a valid date/time. - - - - Initializes a new instance of the struct using the ISO calendar system. - - The year. This is the "absolute year", - so a value of 0 means 1 BC, for example. - The month of year. - The day of month. - The hour. - The minute. - The second. - The millisecond. - The resulting date/time. - The parameters do not form a valid date/time. - - - - Initializes a new instance of the struct. - - The year. This is the "absolute year", so, for - the ISO calendar, a value of 0 means 1 BC, for example. - The month of year. - The day of month. - The hour. - The minute. - The second. - The millisecond. - The calendar. - The resulting date/time. - The parameters do not form a valid date/time. - - - - Initializes a new instance of the struct. - - The year. This is the "absolute year", - so a value of 0 means 1 BC, for example. - The month of year. - The day of month. - The hour. - The minute. - The second. - The millisecond. - The tick within millisecond. - The resulting date/time. - The parameters do not form a valid date/time. - - - - Initializes a new instance of the struct. - - The year. This is the "absolute year", so, for - the ISO calendar, a value of 0 means 1 BC, for example. - The month of year. - The day of month. - The hour. - The minute. - The second. - The millisecond. - The tick within millisecond. - The calendar. - The resulting date/time. - The parameters do not form a valid date/time. - - - Gets the calendar system associated with this local date and time. - - - Gets the century within the era of this local date and time. - - - Gets the year of this local date and time. - This returns the "absolute year", so, for the ISO calendar, - a value of 0 means 1 BC, for example. - - - Gets the year of this local date and time within its century. - This always returns a value in the range 0 to 99 inclusive. - - - Gets the year of this local date and time within its era. - - - Gets the era of this local date and time. - - - - Gets the "week year" of this local date and time. - - - - The WeekYear is the year that matches with the field. - In the standard ISO8601 week algorithm, the first week of the year - is that in which at least 4 days are in the year. As a result of this - definition, day 1 of the first week may be in the previous year. - The WeekYear allows you to query the effective year for that day. - - - For example, January 1st 2011 was a Saturday, so only two days of that week - (Saturday and Sunday) were in 2011. Therefore January 1st is part of - week 52 of WeekYear 2010. Conversely, December 31st 2012 is a Monday, - so is part of week 1 of WeekYear 2013. - - - - - - Gets the month of this local date and time within the year. - - - - - Gets the week within the WeekYear. See for more details. - - - - - Gets the day of this local date and time within the year. - - - - - Gets the day of this local date and time within the month. - - - - - Gets the week day of this local date and time expressed as an value, - for calendars which use ISO days of the week. - - The underlying calendar doesn't use ISO days of the week. - - - - - Gets the week day of this local date and time as a number. - - - For calendars using ISO week days, this gives 1 for Monday to 7 for Sunday. - - - - - - Gets the hour of day of this local date and time, in the range 0 to 23 inclusive. - - - - - Gets the hour of the half-day of this local date and time, in the range 1 to 12 inclusive. - - - - - Gets the minute of this local date and time, in the range 0 to 59 inclusive. - - - - - Gets the second of this local date and time within the minute, in the range 0 to 59 inclusive. - - - - - Gets the millisecond of this local date and time within the second, in the range 0 to 999 inclusive. - - - - - Gets the tick of this local time within the second, in the range 0 to 9,999,999 inclusive. - - - - - Gets the tick of this local date and time within the day, in the range 0 to 863,999,999,999 inclusive. - - - - - Gets the time portion of this local date and time as a . - - - - - Gets the date portion of this local date and time as a in the same calendar system as this value. - - - - - Constructs a from this value which has a - of . - - - is slightly odd - it can be treated as UTC if you use - or as system local time if you use , but it's the only kind which allows - you to construct a with an arbitrary offset, which makes it as close to - the Noda Time non-system-specific "local" concept as exists in .NET. - - A value for the same date and time as this value. - - - - Converts a of any kind to a LocalDateTime in the ISO calendar. This does not perform - any time zone conversions, so a DateTime with a of - will still have the same day/hour/minute etc - it won't be converted into the local system time. - - Value to convert into a Noda Time local date and time - A new with the same values as the specified DateTime. - - - - Indicates whether the current object is equal to another object of the same type. - - An object to compare with this object. - - true if the current object is equal to the parameter; otherwise, false. - - - - - Implements the operator == (equality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are equal to each other, otherwise false. - - - - Implements the operator != (inequality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are not equal to each other, otherwise false. - - - - Compares two LocalDateTime values to see if the left one is strictly earlier than the right - one. - - - This operator always returns false if the two operands have different calendars. See the top-level type - documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is strictly earlier than , false otherwise. - - - - Compares two LocalDateTime values to see if the left one is earlier than or equal to the right - one. - - - This operator always returns false if the two operands have different calendars. See the top-level type - documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is earlier than or equal to , false otherwise. - - - - Compares two LocalDateTime values to see if the left one is strictly later than the right - one. - - - This operator always returns false if the two operands have different calendars. See the top-level type - documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is strictly later than , false otherwise. - - - - Compares two LocalDateTime values to see if the left one is later than or equal to the right - one. - - - This operator always returns false if the two operands have different calendars. See the top-level type - documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is later than or equal to , false otherwise. - - - - Indicates whether this date/time is earlier, later or the same as another one. - - - The comparison is performed in terms of a calendar-independent notion of dates and times; - the calendar systems of both values are ignored. When both values use the same calendar, - this is absolutely natural. However, when comparing a value in one calendar with a value in another, - this can lead to surprising results. For example, 1945 in the ISO calendar corresponds to around 1364 - in the Islamic calendar, so an Islamic date in year 1400 is "after" a date in 1945 in the ISO calendar. - - The other local date/time to compare with this value. - A value less than zero if this date/time is earlier than ; - zero if this date/time is the same as ; a value greater than zero if this date/time is - later than . - - - - Implementation of to compare two LocalDateTimes. - - - This uses explicit interface implementation to avoid it being called accidentally. The generic implementation should usually be preferred. - - is non-null but does not refer to an instance of . - The object to compare this value with. - The result of comparing this LocalDateTime with another one; see for general details. - If is null, this method returns a value greater than 0. - - - - - Adds a period to a local date/time. Fields are added in the order provided by the period. - This is a convenience operator over the method. - - Initial local date and time - Period to add - The resulting local date and time - - - - Add the specified period to the date and time. Friendly alternative to operator+(). - - Initial local date and time - Period to add - The resulting local date and time - - - - Adds a period to this local date/time. Fields are added in the order provided by the period. - - Period to add - The resulting local date and time - - - - Subtracts a period from a local date/time. Fields are subtracted in the order provided by the period. - This is a convenience operator over the method. - - Initial local date and time - Period to subtract - The resulting local date and time - - - - Subtracts the specified period from the date and time. Friendly alternative to operator-(). - - Initial local date and time - Period to subtract - The resulting local date and time - - - - Subtracts a period from a local date/time. Fields are subtracted in the order provided by the period. - This is a convenience operator over the method. - - Period to subtract - The resulting local date and time - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Creates a new LocalDateTime representing the same physical date and time, but in a different calendar. - The returned LocalDateTime is likely to have different date field values to this one. - For example, January 1st 1970 in the Gregorian calendar was December 19th 1969 in the Julian calendar. - - The calendar system to convert this local date to. - The converted LocalDateTime. - - - - Returns a new LocalDateTime representing the current value with the given number of years added. - - - If the resulting date is invalid, lower fields (typically the day of month) are reduced to find a valid value. - For example, adding one year to February 29th 2012 will return February 28th 2013; subtracting one year from - February 29th 2012 will return February 28th 2011. - - The number of years to add - The current value plus the given number of years. - - - - Returns a new LocalDateTime representing the current value with the given number of months added. - - - - This method does not try to maintain the year of the current value, so adding four months to a value in - October will result in a value in the following February. - - - If the resulting date is invalid, the day of month is reduced to find a valid value. - For example, adding one month to January 30th 2011 will return February 28th 2011; subtracting one month from - March 30th 2011 will return February 28th 2011. - - - The number of months to add - The current value plus the given number of months. - - - - Returns a new LocalDateTime representing the current value with the given number of days added. - - - - This method does not try to maintain the month or year of the current value, so adding 3 days to a value on January 30th - will result in a value on February 2nd. - - - The number of days to add - The current value plus the given number of days. - - - - Returns a new LocalDateTime representing the current value with the given number of weeks added. - - The number of weeks to add - The current value plus the given number of weeks. - - - - Returns a new LocalDateTime representing the current value with the given number of hours added. - - The number of hours to add - The current value plus the given number of hours. - - - - Returns a new LocalDateTime representing the current value with the given number of minutes added. - - The number of minutes to add - The current value plus the given number of minutes. - - - - Returns a new LocalDateTime representing the current value with the given number of seconds added. - - The number of seconds to add - The current value plus the given number of seconds. - - - - Returns a new LocalDateTime representing the current value with the given number of milliseconds added. - - The number of milliseconds to add - The current value plus the given number of milliseconds. - - - - Returns a new LocalDateTime representing the current value with the given number of ticks added. - - The number of ticks to add - The current value plus the given number of ticks. - - - - Returns the next falling on the specified , - at the same time of day as this value. - This is a strict "next" - if this value on already falls on the target - day of the week, the returned value will be a week later. - - The ISO day of the week to return the next date of. - The next falling on the specified day of the week. - The underlying calendar doesn't use ISO days of the week. - is not a valid day of the - week (Monday to Sunday). - - - - Returns the previous falling on the specified , - at the same time of day as this value. - This is a strict "previous" - if this value on already falls on the target - day of the week, the returned value will be a week earlier. - - The ISO day of the week to return the previous date of. - The previous falling on the specified day of the week. - The underlying calendar doesn't use ISO days of the week. - is not a valid day of the - week (Monday to Sunday). - - - - Returns an for this local date/time with the given offset. - - This method is purely a convenient alternative to calling the constructor directly. - The offset to apply. - The result of this local date/time offset by the given amount. - - - - Returns the mapping of this local date/time within . - - As UTC is a fixed time zone, there is no chance that this local date/time is ambiguous or skipped. - The result of mapping this local date/time in UTC. - - - - Returns the mapping of this local date/time within the given , - with "strict" rules applied such that an exception is thrown if either the mapping is - ambiguous or the time is skipped. - - - See and for alternative ways to map a local time to a - specific instant. - This is solely a convenience method for calling . - - The time zone in which to map this local date/time. - This local date/time is skipped in the given time zone. - This local date/time is ambiguous in the given time zone. - The result of mapping this local date/time in the given time zone. - - - - Returns the mapping of this local date/time within the given , - with "lenient" rules applied such that ambiguous values map to the - later of the alternatives, and "skipped" values map to the start of the zone interval - after the "gap". - - - See and for alternative ways to map a local time to a - specific instant. - This is solely a convenience method for calling . - - The time zone in which to map this local date/time. - The result of mapping this local date/time in the given time zone. - - - - Resolves this local date and time into a in the given time zone, following - the given to handle ambiguity and skipped times. - - - See and for alternative ways to map a local time - to a specific instant. - This is a convenience method for calling . - - The time zone to map this local date and time into - The resolver to apply to the mapping. - The result of resolving the mapping. - - - - Returns a that represents this instance. - - - The value of the current instance in the default format pattern ("G"), using the current thread's - culture to obtain a format provider. - - - - - Formats the value of the current instance using the specified pattern. - - - A containing the value of the current instance in the specified format. - - The specifying the pattern to use, - or null to use the default format pattern ("G"). - - The to use when formatting the value, - or null to use the current thread's culture to obtain a format provider. - - 2 - - - - - - - - - - - - - Represents a time zone - a mapping between UTC and local time. A time zone maps UTC instants to local times - - or, equivalently, to the offset from UTC at any particular instant. - - - - The mapping is unambiguous in the "UTC to local" direction, but - the reverse is not true: when the offset changes, usually due to a Daylight Saving transition, - the change either creates a gap (a period of local time which never occurs in the time zone) - or an ambiguity (a period of local time which occurs twice in the time zone). Mapping back from - local time to an instant requires consideration of how these problematic times will be handled. - - - Noda Time provides various options when mapping local time to a specific instant: - - - will throw an exception if the mapping from local time is either ambiguous - or impossible, i.e. if there is anything other than one instant which maps to the given local time. - - - will never throw an exception due to ambiguous or skipped times, - resolving to the later option of ambiguous matches or the start of the zone interval after the gap for - skipped times. - - - will apply a to the result of - a mapping. - - - will return a - with complete information about whether the given local time occurs zero times, once or twice. This is the most - fine-grained approach, which is the fiddliest to use but puts the caller in the most control. - - - - - Noda Time has two built-in sources of time zone data available: a copy of the - tz database (also known as the IANA Time Zone database, or zoneinfo - or Olson database), and the ability to convert .NET's own format into a "native" Noda - Time zone. Which of these is most appropriate for you to use will very much depend on your exact needs. The - zoneinfo database is widely used outside Windows, and has more historical data than the Windows-provided - information, but if you need to interoperate with other Windows systems by specifying time zone IDs, you may - wish to stick to the Windows time zones. - - - To obtain a for a given timezone ID, use one of the methods on - (and see for access to the built-in - providers). The UTC timezone is also available via the property on this class. - - - To obtain a representing the system default time zone, you can either call - on a provider to obtain the that - the provider considers matches the system default time zone, or you can construct a - BclDateTimeZone via BclDateTimeZone.ForSystemDefault, which returns a - that wraps the system local . The latter will always - succeed, but has access only to that information available via the .NET time zone; the former may contain more - complete data, but may (in uncommon cases) fail to find a matching . - Note that BclDateTimeZone is not available on the PCL build of Noda Time, so this fallback strategy can - only be used with the desktop version. - - Note that Noda Time does not require that instances be singletons. - As far as reasonably possible, implementations should implement in such a way - that equivalent time zones compare as equal. - - - All time zone implementations within Noda Time are immutable and thread-safe. - See the thread safety section of the user guide for more information. - It is expected that third party implementations will be immutable and thread-safe as well: - code within Noda Time assumes that it can hand out time zones to any thread without any concerns. If you - implement a non-thread-safe time zone, you will need to use it extremely carefully. We'd recommend that you - avoid this if possible. - - - - - The ID of the UTC (Coordinated Universal Time) time zone. This ID is always valid, whatever provider is - used. If the provider has its own mapping for UTC, that will be returned by , but otherwise - the value of the property will be returned. - - - - - Gets the UTC (Coordinated Universal Time) time zone. This is a single instance which is not - provider-specific; it is guaranteed to have the ID "UTC", but may or may not be the instance returned by - e.g. DateTimeZoneProviders.Tzdb["UTC"]. - - A UTC . - - - - Returns a fixed time zone with the given offset. - - - - The returned time zone will have an ID of "UTC" if the offset is zero, or "UTC+/-Offset" - otherwise. In the former case, the returned instance will be equal to . - - - Note also that this method is not required to return the same instance for - successive requests for the same offset; however, all instances returned for a given offset will compare - as equal. - - - The offset for the returned time zone - A fixed time zone with the given offset. - - - - Initializes a new instance of the class. - - The unique id of this time zone. - Set to true if this time zone has no transitions. - Minimum offset applied within this zone - Maximum offset applied within this zone - - - - The provider's ID for the time zone. - - - - This identifies the time zone within the current time zone provider; a different provider may - provide a different time zone with the same ID, or may not provide a time zone with that ID at all. - - - - - - Indicates whether the time zone is fixed, i.e. contains no transitions. - - - This is used as an optimization. If the time zone has no transitions but returns false - for this then the behavior will be correct but the system will have to do extra work. However - if the time zone has transitions and this returns true then the transitions will never - be examined. - - - - - Returns the least (most negative) offset within this time zone, over all time. - - - - - Returns the greatest (most positive) offset within this time zone, over all time. - - - - - Returns the offset from UTC, where a positive duration indicates that local time is - later than UTC. In other words, local time = UTC + offset. - - - This is mostly a convenience method for calling GetZoneInterval(instant).WallOffset, - although it can also be overridden for more efficiency. - - The instant for which to calculate the offset. - - The offset from UTC at the specified instant. - - - - - Gets the zone interval for the given instant; the range of time around the instant in which the same Offset - applies (with the same split between standard time and daylight saving time, and with the same offset). - - - This will always return a valid zone interval, as time zones cover the whole of time. - - The to query. - The defined . - - - - - Finds all zone intervals for the given local instant. Usually there's one (i.e. only a single - instant is mapped to the given local instant within the time zone) but during DST transitions - there can be either 0 (the given local instant doesn't exist, e.g. local time skipped from 1am to - 2am, but you gave us 1.30am) or 2 (the given local instant is ambiguous, e.g. local time skipped - from 2am to 1am, but you gave us 1.30am). - - - This method is implemented in terms of GetZoneInterval(Instant) within DateTimeZone, - and should work for any zone. However, internal derived classes may override this method - for optimization purposes, e.g. if the zone interval is always ambiguous with - a fixed value. - - The local instant to find matching zone intervals for - The struct containing up to two ZoneInterval references. - - - - Returns the earliest valid with the given local date. - - - If midnight exists unambiguously on the given date, it is returned. - If the given date has an ambiguous start time (e.g. the clocks go back from 1am to midnight) - then the earlier ZonedDateTime is returned. If the given date has no midnight (e.g. the clocks - go forward from midnight to 1am) then the earliest valid value is returned; this will be the instant - of the transition. - - The local date to map in this time zone. - The entire day was skipped due to a very large time zone transition. - (This is extremely rare.) - The representing the earliest time in the given date, in this time zone. - - - - Returns complete information about how the given is mapped in this time zone. - - - - Mapping a local date/time to a time zone can give an unambiguous, ambiguous or impossible result, depending on - time zone transitions. Use the return value of this method to handle these cases in an appropriate way for - your use case. - - - As an alternative, consider , which uses a caller-provided strategy to - convert the returned here to a . - - - The local date and time to map in this time zone. - A mapping of the given local date and time to zero, one or two zoned date/time values. - - - - Maps the given to the corresponding , following - the given to handle ambiguity and skipped times. - - - - This is a convenience method for calling and passing the result to the resolver. - Common options for resolvers are provided in the static class. - - - See and for alternative ways to map a local time to a - specific instant. - - - The local date and time to map in this time zone. - The resolver to apply to the mapping. - The result of resolving the mapping. - - - - Maps the given to the corresponding , if and only if - that mapping is unambiguous in this time zone. Otherwise, or - is thrown, depending on whether the mapping is ambiguous or the local - date/time is skipped entirely. - - - See and for alternative ways to map a local time to a - specific instant. - - The local date and time to map into this time zone. - The given local date/time is skipped in this time zone. - The given local date/time is ambiguous in this time zone. - The unambiguous matching if it exists. - - - - Maps the given to the corresponding in a lenient - manner: ambiguous values map to the later of the alternatives, and "skipped" values map to the start of the - zone interval after the "gap". - - - See and for alternative ways to map a local time to a - specific instant. - - The local date/time to map. - The unambiguous mapping if there is one, the later result if the mapping is ambiguous, - or the start of the later zone interval if the given local date/time is skipped. - - - - Returns the interval before this one, if it contains the given local instant, or null otherwise. - - - - - Returns the next interval after this one, if it contains the given local instant, or null otherwise. - - - - - Returns the ID of this time zone. - - - The ID of this time zone. - - 2 - - - - Creates a fixed time zone for offsets -23.5 to +23.5 at every half hour, - fixing the 0 offset as DateTimeZone.Utc. - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Determines whether the specified is equal to this instance. - - - This implementation performs initial checks which would be common to all child implementations, - and then delegates to . - - The to compare with this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Implements equality in derived classes. - - The zone to compare with this one. This is guaranteed (when called by ) to - be a non-null reference of the same type as this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Returns all the zone intervals which occur for any instant in the interval [, ). - - - This method is simply a convenience method for calling without - explicitly constructing the interval beforehand. - - - Inclusive start point of the interval for which to retrieve zone intervals. - Exclusive end point of the interval for which to retrieve zone intervals. - is earlier than . - A sequence of zone intervals covering the given interval. - - - - - Returns all the zone intervals which occur for any instant in the given interval. - - - The zone intervals are returned in chronological order. This method is equivalent to calling for every - instant in the interval and then collapsing to a set of distinct zone intervals. - The first and last zone intervals are likely to also cover instants outside the given interval; - the zone intervals returned are not truncated to match the start and end points. - - - Interval to find zone intervals for. - A sequence of zone intervals covering the given interval. - - - - - Represents a fixed (and calendar-independent) length of time. - - - - A duration is a length of time defined by an integral number of 'ticks', where a tick is equal to 100 - nanoseconds. There are 10,000 ticks in a millisecond. - Although durations are usually used with a positive number of ticks, negative durations are valid, and may occur - naturally when e.g. subtracting an earlier from a later one. - - - A duration represents a fixed length of elapsed time along the time line that occupies the same amount of - time regardless of when it is applied. In contrast, represents a period of time in - calendrical terms (hours, days, and so on) that may vary in elapsed time when applied. - - - In general, use to represent durations applied to global types like - and ; use Period to represent a period applied to local types like - . - - - This type is an immutable value type. See the thread safety section of the user guide for more information. - - - - Represents the zero value. - This field is read-only. - - - - - Represents the value equals to 1 tick; the smallest amount by which an instant can vary. - This field is read-only. - - - - - Represents the value equals to number of ticks in 1 standard week (7 days). - This field is constant. - - - The value of this constant is 6,048,000,000,000 ticks. - - - - - Represents the value equals to number of ticks in 1 day. - This field is constant. - - - The value of this constant is 864 billion ticks; that is, 864,000,000,000 ticks. - - - - - Represents the value equals to number of ticks in 1 hour. - This field is constant. - - - The value of this constant is 36 billion ticks; that is, 36,000,000,000 ticks. - - - - - Represents the value equals to number of ticks in 1 minute. - This field is constant. - - - The value of this constant is 600 million ticks; that is, 600,000,000 ticks. - - - - - Represents the value equals to number of ticks in 1 second. - This field is constant. - - - The value of this constant is 10 million ticks; that is, 10,000,000 ticks. - - - - - Represents the value equals to number of ticks in 1 millisecond. - This field is constant. - - - The value of this constant is 10 thousand ticks; that is, 10,000 ticks. - - - - - Initializes a new instance of the struct. - - The number of ticks. - - - - The total number of ticks in the duration. - - - This property effectively represents all of the information within a Duration value; a duration - is simply a number of ticks. - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Returns a that represents this instance. - - - The value of the current instance in the default format pattern ("o"), using the current thread's - culture to obtain a format provider. - - - - - Formats the value of the current instance using the specified pattern. - - - A containing the value of the current instance in the specified format. - - The specifying the pattern to use, - or null to use the default format pattern ("o"). - - The to use when formatting the value, - or null to use the current thread's culture to obtain a format provider. - - 2 - - - - Implements the operator + (addition). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the sum of the given values. - - - - Adds one duration to another. Friendly alternative to operator+(). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the sum of the given values. - - - - Returns the result of adding another duration to this one, for a fluent alternative to operator+(). - - The duration to add - A new representing the result of the addition. - - - - Implements the operator - (subtraction). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the difference of the given values. - - - - Subtracts one duration from another. Friendly alternative to operator-(). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the difference of the given values. - - - - Returns the result of subtracting another duration from this one, for a fluent alternative to operator-(). - - The duration to subtract - A new representing the result of the subtraction. - - - - Implements the operator / (division). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the result of dividing by - . - - - - Divides a duration by a number. Friendly alternative to operator/(). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the result of dividing by - . - - - - Implements the operator * (multiplication). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the result of multiplying by - . - - - - Implements the operator * (multiplication). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the result of multiplying by - . - - - - Multiplies a duration by a number. Friendly alternative to operator*(). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the product of the given values. - - - - Multiplies a duration by a number. Friendly alternative to operator*(). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the product of the given values. - - - - Implements the operator == (equality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are equal to each other, otherwise false. - - - - Implements the operator != (inequality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are not equal to each other, otherwise false. - - - - Implements the operator < (less than). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is less than the right value, otherwise false. - - - - Implements the operator <= (less than or equal). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is less than or equal to the right value, otherwise false. - - - - Implements the operator > (greater than). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is greater than the right value, otherwise false. - - - - Implements the operator >= (greater than or equal). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is greater than or equal to the right value, otherwise false. - - - - Implements the unary negation operator. - - Duration to negate - The negative value of this duration - - - - Implements a friendly alternative to the unary negation operator. - - Duration to negate - The negative value of this duration - - - - Compares the current object with another object of the same type. - - An object to compare with this object. - - A 32-bit signed integer that indicates the relative order of the objects being compared. - The return value has the following meanings: - - - Value - Meaning - - - < 0 - This object is less than the parameter. - - - 0 - This object is equal to . - - - > 0 - This object is greater than . - - - - - - - Implementation of to compare two offsets. - - - This uses explicit interface implementation to avoid it being called accidentally. The generic implementation should usually be preferred. - - is non-null but does not refer to an instance of . - The object to compare this value with. - The result of comparing this instant with another one; see for general details. - If is null, this method returns a value greater than 0. - - - - - Indicates whether the current object is equal to another object of the same type. - - An object to compare with this object. - - true if the current object is equal to the parameter; - otherwise, false. - - - - - Returns a that represents the given number of weeks, assuming a 'standard' week - consisting of seven 24-hour days. - - The number of weeks. - A representing the given number of weeks. - - - - Returns a that represents the given number of days, assuming a 'standard' 24-hour - day. - - The number of days. - A representing the given number of days. - - - - Returns a that represents the given number of hours. - - The number of hours. - A representing the given number of hours. - - - - Returns a that represents the given number of minutes. - - The number of minutes. - A representing the given number of minutes. - - - - Returns a that represents the given number of seconds. - - The number of seconds. - A representing the given number of seconds. - - - - Returns a that represents the given number of milliseconds. - - The number of milliseconds. - A representing the given number of milliseconds. - - - - Returns a that represents the given number of ticks. - - The number of ticks. - A representing the given number of ticks. - - - - Returns a that represents the same number of ticks as the - given . - - The TimeSpan value to convert - A new Duration with the same number of ticks as the given TimeSpan. - - - - Returns a that represents the same number of ticks as this - . - - A new TimeSpan with the same number of ticks as this Duration. - - - - - - - - - - - - - Represents an instant on the global timeline. - - - - An instant is defined by an integral number of 'ticks' since the Unix epoch (typically described as January 1st - 1970, midnight, UTC, ISO calendar), where a tick is equal to 100 nanoseconds. There are 10,000 ticks in a - millisecond. - - - An has no concept of a particular time zone or calendar: it simply represents a point in - time that can be globally agreed-upon. - - - This type is an immutable value type. See the thread safety section of the user guide for more information. - - - - Represents the smallest possible . - - - Within Noda Time, this is also used to represent 'the beginning of time'. - - - - - Represents the largest possible . - - - Within Noda Time, this is also used to represent 'the end of time'. - - - - - Initializes a new instance of the struct. - - - Note that while the Noda Time type and BCL and - types are all defined in terms of a number of ticks, they use different - origins: the Noda Time types count ticks from the Unix epoch (the start of 1970 AD), while the BCL types - count from the start of 1 AD. This constructor requires the former; to convert from a number-of-ticks since - the BCL epoch, construct a first, then use . - - The number of ticks since the Unix epoch. Negative values represent instants before the - Unix epoch. - - - - The number of ticks since the Unix epoch. Negative values represent instants before the Unix epoch. - - - A tick is equal to 100 nanoseconds. There are 10,000 ticks in a millisecond. - - - - - Compares the current object with another object of the same type. - - An object to compare with this object. - - A 32-bit signed integer that indicates the relative order of the objects being compared. - The return value has the following meanings: - - - Value - Meaning - - - < 0 - This object is less than the parameter. - - - 0 - This object is equal to . - - - > 0 - This object is greater than . - - - - - - - Implementation of to compare two instants. - - - This uses explicit interface implementation to avoid it being called accidentally. The generic implementation should usually be preferred. - - is non-null but does not refer to an instance of . - The object to compare this value with. - The result of comparing this instant with another one; see for general details. - If is null, this method returns a value greater than 0. - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data - structures like a hash table. - - - - - Returns a new value of this instant with the given number of ticks added to it. - - The ticks to add to this instant to create the return value. - The result of adding the given number of ticks to this instant. - - - - Implements the operator + (addition) for + . - - The left hand side of the operator. - The right hand side of the operator. - A new representing the sum of the given values. - - - - Adds the given offset to this instant, to return a . - - - This was previously an operator+ implementation, but operators can't be internal. - - The right hand side of the operator. - A new representing the sum of the given values. - - - - Adds a duration to an instant. Friendly alternative to operator+(). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the sum of the given values. - - - - Returns the result of adding a duration to this instant, for a fluent alternative to operator+(). - - The duration to add - A new representing the result of the addition. - - - - Implements the operator - (subtraction) for - . - - The left hand side of the operator. - The right hand side of the operator. - A new representing the difference of the given values. - - - - Implements the operator - (subtraction) for - . - - The left hand side of the operator. - The right hand side of the operator. - A new representing the difference of the given values. - - - - Subtracts one instant from another. Friendly alternative to operator-(). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the difference of the given values. - - - - Returns the result of subtracting another instant from this one, for a fluent alternative to operator-(). - - The other instant to subtract - A new representing the result of the subtraction. - - - - Subtracts a duration from an instant. Friendly alternative to operator-(). - - The left hand side of the operator. - The right hand side of the operator. - A new representing the difference of the given values. - - - - Returns the result of subtracting a duration from this instant, for a fluent alternative to operator-(). - - The duration to subtract - A new representing the result of the subtraction. - - - - Implements the operator == (equality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are equal to each other, otherwise false. - - - - Implements the operator != (inequality). - - The left hand side of the operator. - The right hand side of the operator. - true if values are not equal to each other, otherwise false. - - - - Implements the operator < (less than). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is less than the right value, otherwise false. - - - - Implements the operator <= (less than or equal). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is less than or equal to the right value, otherwise false. - - - - Implements the operator > (greater than). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is greater than the right value, otherwise false. - - - - Implements the operator >= (greater than or equal). - - The left hand side of the operator. - The right hand side of the operator. - true if the left value is greater than or equal to the right value, otherwise false. - - - - Returns a new instant corresponding to the given UTC date and time in the ISO calendar. - In most cases applications should use to represent a date - and time, but this method is useful in some situations where an is - required, such as time zone testing. - - The year. This is the "absolute year", - so a value of 0 means 1 BC, for example. - The month of year. - The day of month. - The hour. - The minute. - An value representing the given date and time in UTC and the ISO calendar. - - - - Returns a new instant corresponding to the given UTC date and - time in the ISO calendar. In most cases applications should - use - to represent a date and time, but this method is useful in some - situations where an Instant is required, such as time zone testing. - - The year. This is the "absolute year", - so a value of 0 means 1 BC, for example. - The month of year. - The day of month. - The hour. - The minute. - The second. - An value representing the given date and time in UTC and the ISO calendar. - - - - Returns the later instant of the given two. - - The first instant to compare. - The second instant to compare. - The later instant of or . - - - - Returns the earlier instant of the given two. - - The first instant to compare. - The second instant to compare. - The earlier instant of or . - - - - Returns a that represents this instance. - - - The value of the current instance in the default format pattern ("g"), using the current thread's - culture to obtain a format provider. - - - - - Formats the value of the current instance using the specified pattern. - - - A containing the value of the current instance in the specified format. - - The specifying the pattern to use, - or null to use the default format pattern ("g"). - - The to use when formatting the value, - or null to use the current thread's culture to obtain a format provider. - - 2 - - - - Indicates whether the value of this instant is equal to the value of the specified instant. - - The value to compare with this instance. - - true if the value of this instant is equal to the value of the parameter; - otherwise, false. - - - - - Constructs a from this Instant which has a - of and represents the same instant of time as this value. - - A representing the same instant in time as this value, with a kind of "universal". - - - - Constructs a from this Instant which has an offset of zero. - - A representing the same instant in time as this value. - - - - Converts a into a new Instant representing the same instant in time. Note that - the offset information is not preserved in the returned Instant. - - An value representing the same instant in time as the given . - Date and time value with an offset. - - - - Converts a into a new Instant representing the same instant in time. - - An value representing the same instant in time as the given universal . - Date and time value which must have a of - is not of - . - - - - Initializes a new instance of the struct based - on a number of seconds since the Unix epoch of (ISO) January 1st 1970, midnight, UTC. - - Number of seconds since the Unix epoch. May be negative (for instants before the epoch). - An at exactly the given number of seconds since the Unix epoch. - The constructed instant would be out of the range representable in Noda Time. - - - - Initializes a new instance of the struct based - on a number of milliseconds since the Unix epoch of (ISO) January 1st 1970, midnight, UTC. - - Number of milliseconds since the Unix epoch. May be negative (for instants before the epoch). - An at exactly the given number of milliseconds since the Unix epoch. - The constructed instant would be out of the range representable in Noda Time. - - - - Initializes a new instance of the struct based - on a number of ticks since the Unix epoch of (ISO) January 1st 1970, midnight, UTC. - - This is equivalent to calling the constructor directly, but indicates - intent more explicitly. - An at exactly the given number of ticks since the Unix epoch. - Number of ticks since the Unix epoch. May be negative (for instants before the epoch). - - - - Returns the representing the same point in time as this instant, in the UTC time - zone and ISO-8601 calendar. This is a shortcut for calling with an - argument of . - - A for the same instant, in the UTC time zone - and the ISO-8601 calendar - - - - Returns the representing the same point in time as this instant, in the - specified time zone and ISO-8601 calendar. - - The time zone in which to represent this instant. - A for the same instant, in the given time zone - and the ISO-8601 calendar - - - - Returns the representing the same point in time as this instant, in the - specified time zone and calendar system. - - The time zone in which to represent this instant. - The calendar system in which to represent this instant. - A for the same instant, in the given time zone - and calendar - - - - Returns the representing the same point in time as this instant, with - the specified UTC offset in the ISO calendar system. - - The offset from UTC with which to represent this instant. - An for the same instant, with the given offset - in the ISO calendar system - - - - Returns the representing the same point in time as this instant, with - the specified UTC offset and calendar system. - - The offset from UTC with which to represent this instant. - The calendar system in which to represent this instant. - An for the same instant, with the given offset - and calendar - - - - - - - - - - - - - An interval between two instants in time (start and end). - - - - The interval includes the start instant and excludes the end instant, unless the end instant - is in which case it's deemed to be inclusive. - (An interval stretching to infinity includes the end of time.) - - - The end may equal the start (resulting in an empty interval), but will not be before the start. - - - This type is an immutable value type. See the thread safety section of the user guide for more information. - - - The start of the interval. - - - The end of the interval. This will never be earlier than the start. - - - - Initializes a new instance of the struct. - The interval includes the instant and excludes the - instant. The end may equal the start (resulting in an empty interval), but must not be before the start. - - is earlier than . - The start . - The end . - - - - Gets the start instant - the inclusive lower bound of the interval. - - - This will never be later than , though it may be equal to it. - - The start . - - - - Gets the end instant - the exclusive upper bound of the interval. - - - This will never be earlier than , though it may be equal to it. - If this value is , it is treated as an inclusive - upper bound: an interval stretching to infinity includes the end of time. - - The end . - - - - Returns the duration of the interval. - - - This will always be a non-negative duration, though it may be zero. - - The duration of the interval. - - - - Returns whether or not this interval contains the given instant. - - - The interval is considered to include the instant but - not the instant - unless the end is , in - which case it's considered to be infinite from the start point onwards. - - Instant to test. - True if this interval contains the given instant; false otherwise. - - - - Indicates whether the value of this interval is equal to the value of the specified interval. - - The value to compare with this instance. - - true if the value of this instant is equal to the value of the parameter; - otherwise, false. - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; - otherwise, false. - - - - - Returns the hash code for this instance. - - - A 32-bit signed integer that is the hash code for this instance. - - 2 - - - - Returns a string representation of this interval, in extended ISO-8601 format: the format - is "start/end" where each instant uses a format of "yyyy'-'MM'-'dd'T'HH':'mm':'ss;FFFFFFF'Z'". - - A string representation of this interval. - - - - Implements the operator ==. - - The left. - The right. - The result of the operator. - - - - Implements the operator !=. - - The left. - The right. - The result of the operator. - - - - - - - - - - - - - Useful constants, mostly along the lines of "number of milliseconds in an hour". - - - - - A constant for the number of ticks in a millisecond. The value of this constant is 10,000. - - - - - A constant for the number of ticks in a second. The value of this constant is 10,000,000. - - - - - A constant for the number of ticks in a minute. The value of this constant is 600,000,000. - - - - - A constant for the number of ticks in an hour. The value of this constant is 36,000,000,000. - - - - - A constant for the number of ticks in a standard 24-hour day. - The value of this constant is 864,000,000,000. - - - - - A constant for the number of ticks in a standard week of seven 24-hour days. - The value of this constant is 6,048,000,000,000. - - - - - A constant for the number of milliseconds per second. - The value of this constant is 1000. - - - - - A constant for the number of milliseconds per minute. - The value of this constant is 60,000. - - - - - A constant for the number of milliseconds per hour. - The value of this constant is 3,600,000. - - - - - A constant for the number of milliseconds per standard 24-hour day. - The value of this constant is 86,400,000. - - - - - A constant for the number of milliseconds per standard week of seven 24-hour days. - The value of this constant is 604,800,000. - - - - - A constant for the number of seconds per minute. - The value of this constant is 60. - - - - - A constant for the number of seconds per hour. - The value of this constant is 3,600. - - - - - A constant for the number of seconds per standard 24-hour day. - The value of this constant is 86,400. - - - - - A constant for the number of seconds per standard week of seven 24-hour days. - The value of this constant is 604,800. - - - - - A constant for the number of minutes per hour. - The value of this constant is 60. - - - - - A constant for the number of minutes per standard 24-hour day. - The value of this constant is 1,440. - - - - - A constant for the number of minutes per standard week of seven 24-hour days. - The value of this constant is 10,080. - - - - - A constant for the number of hours in a standard day. Note that the number of hours - in a day can vary due to daylight saving effects. - The value of this constant is 24. - - - - - A constant for the number of hours in a standard week of seven 24-hour days. - The value of this constant is 168. - - - - - Number of days in a standard Gregorian week. - The value of this constant is 7. - - - - - The instant at the Unix epoch of midnight 1st January 1970 UTC. - - - This value is not only the Unix epoch, but the Noda Time epoch, as it represents the value - with a property of 0. - - - - - The instant at the BCL epoch of midnight 1st January 0001 UTC. - - - - - Conversion methods which don't naturally fit into any other types - for example, for - enums which can't specify any other code. In most cases, conversions to and from BCL types - are provided within the type itself - such as - and . - - - Many of the methods within this class could be expressed as extension methods - but currently - Noda Time always builds against .NET 2. In a future version, there may be multiple build targets, - allowing these to become extension methods for the builds which use .NET 3.5 and higher. - - All members of this type are thread-safe. See the thread safety section of the user guide for more information. - - - - Converts from the Noda Time enum to the equivalent BCL - value. Other than Sunday, the BCL and ISO values are the same - - but ISO 8601 defines Sunday as day 7, and the BCL defines it as day 0. - - ISO day of week value to convert. - The ISO day of week value equivalent to the one passed in. - The parameter - is not a valid day of the week. - - - - Converts from the BCL enum to the equivalent Noda Time value. - Other than Sunday, the BCL and ISO values are the same - but ISO 8601 defines - Sunday as day 7, and the BCL defines it as day 0. - - ISO day of week value to convert. - The BCL day of week value equivalent to the one passed in. - The parameter - is not a valid day of the week. - - - - Provides method to help with generating hash codes for structures and classes. This handles - value types, nullable type, and objects. - - - The basic usage pattern is: - - - public override int GetHashCode() - { - int hash = HashCodeHelper.Initialize(); - hash = HashCodeHelper.Hash(hash, Field1); - hash = HashCodeHelper.Hash(hash, Field1); - hash = HashCodeHelper.Hash(hash, Field1); - ... - return hash; - } - - - - - - - The multiplier for each value. - - - - - The initial hash value. - - - - - Returns the initial value for a hash code. - - The initial interger value. - - - - Adds the hash value for the given value to the current hash and returns the new value. - - The type of the value being hashed. - The previous hash code. - The value to hash. - The new hash code. - - - - Adds the hash value for a int to the current hash value and returns the new value. - - The previous hash code. - The value to add to the hash code. - The new hash code. - - - - Exception thrown when data read by Noda Time (such as serialized time zone data) is invalid. This includes - data which is truncated, i.e. we expect more data than we can read. - - - This type only exists as InvalidDataException doesn't exist in the Portable Class Library. - Unfortunately, InvalidDataException itself is sealed, so we can't derive from it for the sake - of backward compatibility. - - Any public static members of this type are thread safe. Any instance members are not guaranteed to be thread safe. - See the thread safety section of the user guide for more information. - - - - - Creates an instance with the given message. - - The message for the exception. - - - - Creates an instance with the given message. - - The message for the exception. - Underlying cause of the error. - - - - Implements a thread-safe cache of a fixed size, with a single computation function. - (That happens to be all we need at the time of writing.) - - - For simplicity's sake, eviction is currently on a least-recently-added basis (not LRU). This - may change in the future. - - Type of key - Type of value - - - - Fetches a value from the cache, populating it if necessary. - - Key to fetch - The value associated with the key. - - - - Returns the number of entries currently in the cache, primarily for diagnostic purposes. - - - - - Returns a copy of the keys in the cache as a list, for diagnostic purposes. - - - - - Clears the cache. - - - - - - The NodaTime.Utility namespace contains helper classes which don't really fit anywhere else... - - - - - - Implementation of IDictionary{,} which delegates to an underlying dictionary for read, but - doesn't support any mutation operations. - - The "Noda" prefix is to avoid any confusion with the BCL ReadOnlyDictionary type - introduced in .NET 4.5. - Key type - Value type - - - - An equality comparer which compares references for equality and uses the "original" object hash code - for hash codes. - - - - - Helper static methods for argument/state validation. - - - - - Returns the given argument after checking whether it's null. This is useful for putting - nullity checks in parameters which are passed to base class constructors. - - - - - A in a specific time zone and with a particular offset to distinguish - between otherwise-ambiguous instants. A is global, in that it maps to a single - . - - - Although includes both local and global concepts, it only supports - duration-based - and not calendar-based - arithmetic. This avoids ambiguities - and skipped date/time values becoming a problem within a series of calculations; instead, - these can be considered just once, at the point of conversion to a . - - Comparisons of values can be handled in a way which is either calendar and zone sensitive or insensitive. - Noda Time implements all the operators (and the method) such that all operators other than - will return false if asked to compare two values in different calendar systems or time zones. - - - However, the method (implementing ) is calendar and zone insensitive; it compares the two - global instants in terms of when they actually occurred. - - - It's unclear at the time of this writing whether this is the most appropriate approach, and it may change in future versions. In general, - it would be a good idea for users to avoid comparing dates in different calendar systems, and indeed most users are unlikely to ever explicitly - consider which calendar system they're working in anyway. - - - This type is an immutable value type. See the thread safety section of the user guide for more information. - - - - Internal constructor used by other code that has already validated and - computed the appropriate field values. No further validation is performed. - - - - - Initializes a new instance of the struct. - - The instant. - The time zone. - The calendar system. - - - - Initializes a new instance of the struct in the specified time zone - and the ISO calendar. - - The instant. - The time zone. - - - - Initializes a new instance of the struct in the specified time zone - from a given local time and offset. The offset is validated to be correct as part of initialization. - In most cases a local time can only map to a single instant anyway, but the offset is included here for cases - where the local time is ambiguous, usually due to daylight saving transitions. - - The local date and time. - The time zone. - The offset between UTC and local time at the desired instant. - is not a valid offset at the given - local date and time. - - - Gets the offset of the local representation of this value from UTC. - - - Gets the time zone associated with this value. - - - Gets the local instant associated with this value. - - - - Gets the local date and time represented by this zoned date and time. The returned - will have the same calendar system and return the same values for - each of the calendar properties (Year, MonthOfYear and so on), but will not be associated with any - particular time zone. - - - - Gets the calendar system associated with this zoned date and time. - - - - Gets the local date represented by this zoned date and time. The returned - will have the same calendar system and return the same values for each of the date-based calendar - properties (Year, MonthOfYear and so on), but will not be associated with any particular time zone. - - - - - Gets the time portion of this zoned date and time. The returned will - return the same values for each of the time-based properties (Hour, Minute and so on), but - will not be associated with any particular time zone. - - - - Gets the era for this zoned date and time. - - - Gets the century within the era of this zoned date and time. - - - Gets the year of this zoned date and time. - This returns the "absolute year", so, for the ISO calendar, - a value of 0 means 1 BC, for example. - - - Gets the year of this zoned date and time within its century. - This always returns a value in the range 0 to 99 inclusive. - - - Gets the year of this zoned date and time within its era. - - - - Gets the "week year" of this date and time. - - - - The WeekYear is the year that matches with the field. - In the standard ISO-8601 week algorithm, the first week of the year - is that in which at least 4 days are in the year. As a result of this - definition, day 1 of the first week may be in the previous year. - The WeekYear allows you to query the effective year for that day. - - - For example, January 1st 2011 was a Saturday, so only two days of that week - (Saturday and Sunday) were in 2011. Therefore January 1st is part of - week 52 of WeekYear 2010. Conversely, December 31st 2012 is a Monday, - so is part of week 1 of WeekYear 2013. - - - - - Gets the month of this zoned date and time within the year. - - - Gets the week within the WeekYear. See for more details. - - - Gets the day of this zoned date and time within the year. - - - - Gets the day of this zoned date and time within the month. - - - - - Gets the week day of this zoned date and time expressed as an value, - for calendars which use ISO days of the week. - - The underlying calendar doesn't use ISO days of the week. - - - - - Gets the week day of this zoned date and time as a number. - - - For calendars using ISO week days, this gives 1 for Monday to 7 for Sunday. - - - - - - Gets the hour of day of this zoned date and time, in the range 0 to 23 inclusive. - - - - - Gets the hour of the half-day of this zoned date and time, in the range 1 to 12 inclusive. - - - - - Gets the minute of this zoned date and time, in the range 0 to 59 inclusive. - - - - - Gets the second of this zoned date and time within the minute, in the range 0 to 59 inclusive. - - - - - Gets the millisecond of this zoned date and time within the second, in the range 0 to 999 inclusive. - - - - - Gets the tick of this zoned date and time within the second, in the range 0 to 9,999,999 inclusive. - - - - - Gets the tick of this zoned date and time within the day, in the range 0 to 863,999,999,999 inclusive. - - - - - Converts this value to the instant it represents on the time line. - - - This is always an unambiguous conversion. Any difficulties due to daylight saving - transitions or other changes in time zone are handled when converting from a - to a ; the ZonedDateTime remembers - the actual offset from UTC to local time, so it always knows the exact instant represented. - - The instant corresponding to this value. - - - - Creates a new representing the same instant in time, in the - same calendar but a different time zone. - - The target time zone to convert to. - A new value in the target time zone. - - - - Indicates whether the current object is equal to another object of the same type. - - - true if the current object is equal to the parameter; otherwise, false. - - An object to compare with this object. - True if the specified value is the same instant in the same time zone; false otherwise. - - - - Indicates whether this instance and a specified object are equal. - - - true if and this instance are the same type and represent the same value; otherwise, false. - - Another object to compare to. - 2 - True if the specified value is a representing the same instant in the same time zone; false otherwise. - - - - Computes the hash code for this instance. - - - A 32-bit signed integer that is the hash code for this instance. - - 2 - - - - Implements the operator ==. - - The first value to compare - The second value to compare - True if the two operands are equal according to ; false otherwise - - - - Implements the operator !=. - - The first value to compare - The second value to compare - False if the two operands are equal according to ; true otherwise - - - - Compares two values to see if the left one is strictly earlier than the right - one. - - - This operator always returns false if the two operands have different calendars or time zones. - See the top-level type documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is strictly earlier than , false otherwise. - - - - Compares two values to see if the left one is earlier than or equal to the right - one. - - - This operator always returns false if the two operands have different calendars or time zones. - See the top-level type documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is earlier than or equal to , false otherwise. - - - - Compares two values to see if the left one is strictly later than the right - one. - - - This operator always returns false if the two operands have different calendars or time zones. - See the top-level type documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is strictly later than , false otherwise. - - - - Compares two values to see if the left one is later than or equal to the right - one. - - - This operator always returns false if the two operands have different calendars or time zones. - See the top-level type documentation for more information about comparisons. - - First operand of the comparison - Second operand of the comparison - true if the is later than or equal to , false otherwise. - - - - Indicates whether this date/time is earlier, later or the same as another one. - - - This is purely done in terms of the instant represented; the calendar system and time zone are ignored. - - The other zoned date/time to compare this one with - A value less than zero if the instant represented by this zoned date/time is earlier than the one in - ; zero if the instant is the same as the one in ; - a value greater than zero if the instant is later than the one in . - - - - Implementation of to compare two ZonedDateTimes. - - - This uses explicit interface implementation to avoid it being called accidentally. The generic implementation should usually be preferred. - - is non-null but does not refer to an instance of . - The object to compare this value with. - The result of comparing this ZonedDateTime with another one; see for general details. - If is null, this method returns a value greater than 0. - - - - - Returns a new with the time advanced by the given duration. Note that - due to daylight saving time changes this may not advance the local time by the same amount. - - - The returned value retains the calendar system and time zone of the . - - The to add the duration to. - The duration to add. - A new value with the time advanced by the given duration, in the same calendar system and time zone. - - - - Adds a duration to a zoned date and time. Friendly alternative to operator+(). - - The value to add the duration to. - The duration to add - A new value with the time advanced by the given duration, in the same calendar system and time zone. - - - - Returns the result of adding a duration to this zoned date and time, for a fluent alternative to operator+(). - - The duration to add - A new representing the result of the addition. - - - - Subtracts a duration from a zoned date and time. Friendly alternative to operator-(). - - The value to subtract the duration from. - The duration to subtract. - A new value with the time "rewound" by the given duration, in the same calendar system and time zone. - - - - Returns the result of subtracting a duration from this zoned date and time, for a fluent alternative to operator-(). - - The duration to subtract - A new representing the result of the subtraction. - - - - Returns a new ZonedDateTime with the duration subtracted. Note that - due to daylight saving time changes this may not change the local time by the same amount. - - - The returned value retains the calendar system and time zone of the . - - The value to subtract the duration from. - The duration to subtract. - A new value with the time "rewound" by the given duration, in the same calendar system and time zone. - - - - Returns the containing this value, in the time zone this - value refers to. - - - This is simply a convenience method - it is logically equivalent to converting this - value to an and then asking the appropriate - for the ZoneInterval containing that instant. - - The ZoneInterval containing this value. - - - - Indicates whether or not this is in daylight saving time - for its time zone. This is determined by checking the property - of the zone interval containing this value. - - - true if the zone interval containing this value has a non-zero savings - component; false otherwise. - - - - Returns a that represents this instance. - - - The value of the current instance in the default format pattern ("G"), using the current thread's - culture to obtain a format provider. - - - - - Formats the value of the current instance using the specified pattern. - - - A containing the value of the current instance in the specified format. - - The specifying the pattern to use, - or null to use the default format pattern ("G"). - - The to use when formatting the value, - or null to use the current thread's culture to obtain a format provider. - - 2 - - - - Constructs a value with the same local time and offset from - UTC as this value. - - - An offset does not convey as much information as a time zone; a - represents an instant in time along with an associated local time, but it doesn't allow you - to find out what the local time would be for another instant. - - A representation of this value. - - - - Returns a new representing the same instant in time as the given - . - The time zone used will be a fixed time zone, which uses the same offset throughout time. - - Date and time value with an offset. - A value representing the same instant in time as the given . - - - - Constructs a from this which has a - of and represents the same instant of time as - this value rather than the same local time. - - A representation of this value with a "universal" kind, with the same - instant of time as this value. - - - - Constructs a from this which has a - of and represents the same local time as - this value rather than the same instant in time. - - - is slightly odd - it can be treated as UTC if you use - or as system local time if you use , but it's the only kind which allows - you to construct a with an arbitrary offset. - - A representation of this value with an "unspecified" kind, with the same - local date and time as this value. - - - - Constructs an with the same local date and time, and the same offset - as this zoned date and time, effectively just "removing" the time zone itself. - - An OffsetDateTime with the same local date/time and offset as this value. - - - - Base class for comparers. - - - Use the static properties of this class to obtain instances. - For the curious: this class only exists so that in the future, it can expose more functionality - probably - implementing . If we simply provided properties on ZonedDateTime of type - we'd have no backward-compatible way of adding to the set of implemented interfaces. - - - - - Returns a comparer which compares values by their local date/time, without reference to - the time zone, offset or the calendar system. - - - For example, this comparer considers 2013-03-04T20:21:00 (Europe/London) to be later than - 2013-03-04T19:21:00 (America/Los_Angeles) even though the second value represents a later instant in time. - This property will return a reference to the same instance every time it is called. - - - - - Returns a comparer which compares values by the instants obtained by applying the offset to - the local date/time, ignoring the calendar system. - - - For example, this comparer considers 2013-03-04T20:21:00 (Europe/London) to be earlier than - 2013-03-04T19:21:00 (America/Los_Angeles) even though the second value has a local time which is earlier; the time zones - mean that the first value occurred earlier in the universal time line. - This comparer behaves the same way as the method; it is provided for symmetry with . - This property will return a reference to the same instance every time it is called. - - - - - Internal constructor to prevent external classes from deriving from this. - (That means we can add more abstract members in the future.) - - - - - Compares two values and returns a value indicating whether one is less than, equal to, or greater than the other. - - The first value to compare. - The second value to compare. - A signed integer that indicates the relative values of and , as shown in the following table. - - - Value - Meaning - - - Less than zero - is less than . - - - Zero - is equals to . - - - Greater than zero - is greater than . - - - - - - - Implementation for . - - - - - - - - Implementation for . - - - - - - - - - - - - - - - - - Indicates that the value of the marked element could be null sometimes, - so the check for null is necessary before its usage - - - [CanBeNull] public object Test() { return null; } - public void UseTest() { - var p = Test(); - var s = p.ToString(); // Warning: Possible 'System.NullReferenceException' - } - - - - - Indicates that the value of the marked element could never be null - - - [NotNull] public object Foo() { - return null; // Warning: Possible 'null' assignment - } - - - - - Indicates that the marked method builds string by format pattern and (optional) arguments. - Parameter, which contains format string, should be given in constructor. The format string - should be in -like form - - - [StringFormatMethod("message")] - public void ShowError(string message, params object[] args) { /* do something */ } - public void Foo() { - ShowError("Failed: {0}"); // Warning: Non-existing argument in format string - } - - - - - Specifies which parameter of an annotated method should be treated as format-string - - - - - Indicates that the function argument should be string literal and match one - of the parameters of the caller function. For example, ReSharper annotates - the parameter of - - - public void Foo(string param) { - if (param == null) - throw new ArgumentNullException("par"); // Warning: Cannot resolve symbol - } - - - - - Describes dependency between method input and output - - -

Function Definition Table syntax:

- - FDT ::= FDTRow [;FDTRow]* - FDTRow ::= Input => Output | Output <= Input - Input ::= ParameterName: Value [, Input]* - Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} - Value ::= true | false | null | notnull | canbenull - - If method has single input parameter, it's name could be omitted.
- Using halt (or void/nothing, which is the same) - for method output means that the method doesn't return normally.
- canbenull annotation is only applicable for output parameters.
- You can use multiple [ContractAnnotation] for each FDT row, - or use single attribute with rows separated by semicolon.
-
- - - [ContractAnnotation("=> halt")] - public void TerminationMethod() - - - [ContractAnnotation("halt <= condition: false")] - public void Assert(bool condition, string text) // regular assertion method - - - [ContractAnnotation("s:null => true")] - public bool IsNullOrEmpty(string s) // string.IsNullOrEmpty() - - - // A method that returns null if the parameter is null, and not null if the parameter is not null - [ContractAnnotation("null => null; notnull => notnull")] - public object Transform(object data) - - - [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")] - public bool TryParse(string s, out Person result) - - -
- - - Indicates that marked element should be localized or not - - - [LocalizationRequiredAttribute(true)] - public class Foo { - private string str = "my string"; // Warning: Localizable string - } - - - - - Indicates that the marked symbol is used implicitly - (e.g. via reflection, in external library), so this symbol - will not be marked as unused (as well as by other usage inspections) - - - - - Should be used on attributes and causes ReSharper - to not mark symbols marked with such attributes as unused - (as well as by other usage inspections) - - - - Only entity marked with attribute considered used - - - Indicates implicit assignment to a member - - - - Indicates implicit instantiation of a type with fixed constructor signature. - That means any unused constructor parameters won't be reported as such. - - - - Indicates implicit instantiation of a type - - - - Specify what is considered used implicitly - when marked with - or - - - - Members of entity marked with attribute are considered used - - - Entity marked with attribute and all its members considered used - - - - Tells code analysis engine if the parameter is completely handled - when the invoked method is on stack. If the parameter is a delegate, - indicates that delegate is executed while the method is executed. - If the parameter is an enumerable, indicates that it is enumerated - while the method is executed - - - - - Indicates that a method does not make any observable state changes. - The same as System.Diagnostics.Contracts.PureAttribute - - - [Pure] private int Multiply(int x, int y) { return x * y; } - public void Foo() { - const int a = 2, b = 2; - Multiply(a, b); // Waring: Return value of pure method is not used - } - - -
-
diff --git a/Plugins/WP8/README.txt b/Plugins/WP8/README.txt deleted file mode 100755 index 42aa1d101..000000000 --- a/Plugins/WP8/README.txt +++ /dev/null @@ -1 +0,0 @@ -These DLLs are required for building a Unity project using the Appboy Unity Adapter. \ No newline at end of file diff --git a/Plugins/WP8/System.Net.Http.Extensions.dll b/Plugins/WP8/System.Net.Http.Extensions.dll deleted file mode 100755 index aecc82ea6..000000000 Binary files a/Plugins/WP8/System.Net.Http.Extensions.dll and /dev/null differ diff --git a/Plugins/WP8/System.Net.Http.Extensions.xml b/Plugins/WP8/System.Net.Http.Extensions.xml deleted file mode 100755 index 1190940f3..000000000 --- a/Plugins/WP8/System.Net.Http.Extensions.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - System.Net.Http.Extensions - - - - - Extension methods for which expose differences in platform specific capabilities. - - - - - Gets a value that indicates if HttpClientHandler.AllowAutoRedirect is supported by the handler. - When this property is true and HttpClientHandler.SupportsRedirectConfiguration is false, setting HttpClientHandler.AllowAutoRedirect to true will cause the system default to be used for HttpClientHandler.MaximumAutomaticRedirections. - - The to check. - Returns .true if the if the handler supports configuration settings for the property; otherwise false. - - - - Gets a value that indicates if is supported by the handler. - - The to check. - Returns .true if the if the handler supports configuration settings for the property; otherwise false. - - - - Gets a value that indicates if , HttpRequestMessage.ProtocolVersion, and HttpResponseMessage.ProtocolVersion are supported by the handler. - - The to check. - Returns .true if the if the handler supports configuration settings for the , HttpRequestMessage.ProtocolVersion, and HttpResponseMessage.ProtocolVersion properties; otherwise false. - - - - Gets a value that indicates if HttpRequestMessage.Headers with or header value of 'chunked' is supported by the handler. - - The to check. - Returns .true if the if the handler supports setting HttpRequestMessage.Headers with or header value of 'chunked'; otherwise false. - - - - Gets a value that indicates if is supported by the handler. - When this property is true and HttpClientHandler.SupportsProxy is false, setting HttpClientHandler.UseProxy to true will cause the system default to be used for HttpClientHandler.Proxy. - - The to check. - Returns .true if the if the handler supports configuration settings for the property; otherwise false. - - - diff --git a/Plugins/WP8/System.Net.Http.Primitives.dll b/Plugins/WP8/System.Net.Http.Primitives.dll deleted file mode 100755 index 3a26074c2..000000000 Binary files a/Plugins/WP8/System.Net.Http.Primitives.dll and /dev/null differ diff --git a/Plugins/WP8/System.Net.Http.Primitives.xml b/Plugins/WP8/System.Net.Http.Primitives.xml deleted file mode 100755 index fb7747088..000000000 --- a/Plugins/WP8/System.Net.Http.Primitives.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - System.Net.Http.Primitives - - - - - Represents the file compression and decompression encoding format to be used to compress the data received in response to an . - - - - - Do not use compression. - - - - - Use the gZip compression-decompression algorithm. - - - - - Use the deflate compression-decompression algorithm. - - - - - Provides the base interface for implementation of proxy access for the class. - - - - - Returns the URI of a proxy. - - A that specifies the requested Internet resource. - A instance that contains the URI of the proxy used to contact . - - - - Indicates that the proxy should not be used for the specified host. - - The of the host to check for proxy use. - true if the proxy server should not be used for ; otherwise, false. - - - - The credentials to submit to the proxy server for authentication. - - An instance that contains the credentials that are needed to authenticate a request to the proxy server. - - - - The System.Net.TransportContext class provides additional context about the underlying transport layer. - - - - diff --git a/Plugins/WP8/System.Net.Http.dll b/Plugins/WP8/System.Net.Http.dll deleted file mode 100755 index f69b4fc6a..000000000 Binary files a/Plugins/WP8/System.Net.Http.dll and /dev/null differ diff --git a/Plugins/WP8/System.Net.Http.xml b/Plugins/WP8/System.Net.Http.xml deleted file mode 100755 index 940e260b6..000000000 --- a/Plugins/WP8/System.Net.Http.xml +++ /dev/null @@ -1,1581 +0,0 @@ - - - - System.Net.Http - - - - Provides HTTP content based on a byte array. - - - Initializes a new instance of the class. - The content used to initialize the . - The parameter is null. - - - Initializes a new instance of the class. - The content used to initialize the . - The offset, in bytes, in the parameter used to initialize the . - The number of bytes in the starting from the parameter used to initialize the . - The parameter is null. - The parameter is less than zero.-or-The parameter is greater than the length of content specified by the parameter.-or-The parameter is less than zero.-or-The parameter is greater than the length of content specified by the parameter - minus the parameter. - - - Creates an HTTP content stream for reading whose backing store is memory from the . - Returns .The HTTP content stream. - - - Serialize and write the byte array provided in the constructor to an HTTP content stream. - The target stream. - Information about the transport(channel binding token, for example). This parameter may be null. - - - Serialize and write the byte array provided in the constructor to an HTTP content stream as an asynchronous operation. - Returns . The task object representing the asynchronous operation. - The target stream. - Information about the transport, like channel binding token. This parameter may be null. - - - Determines whether a byte array has a valid length in bytes. - Returns .true if is a valid length; otherwise, false. - The length in bytes of the byte array. - - - A base type for HTTP handlers that delegate the processing of HTTP response messages to another handler, called the inner handler. - - - Initializes a new instance of the class with a specific inner handler. - The inner handler which is responsible for processing the HTTP response messages. - - - Releases the unmanaged resources used by the , and optionally disposes of the managed resources. - true to release both managed and unmanaged resources; false to releases only unmanaged resources. - - - Sends an HTTP request to the inner handler to send to the server synchronously. - Returns . The HTTP response message from the inner handler. - The HTTP request message to send to the server. - A cancellation token to cancel operation. - - - Sends an HTTP request to the inner handler to send to the server as an asynchronous operation. - Returns . The task object representing the asynchronous operation. - The HTTP request message to send to the server. - A cancellation token to cancel operation. - - - A container for name/value tuples encoded using application/x-www-form-urlencoded MIME type. - - - Initializes a new instance of the class with a specific collection of name/value pairs. - A collection of name/value pairs. - - - Creates an HTTP content stream for reading whose backing store is memory from the . - Returns . The HTTP content stream. - - - Serialize and write the provided name/value pairs in the constructor to an HTTP content stream. - The target stream. - Information about the transport (the channel binding token, for example). This parameter may be a null reference. - - - Serialize and write the provided name/value pairs in the constructor to an HTTP content stream as an asynchronous operation. - Returns . The task object representing the asynchronous operation. - The target stream. - Information about the transport (the channel binding token, for example). This parameter may be a null reference. - - - Determines whether the encoded name/value data has a valid length in bytes. - Returns .true if is a valid length; otherwise, false. - The length in bytes of the encoded name/value data. - - - Provides a base class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class with a specific handler. - The HTTP handler stack to use for sending requests. - - - Gets or sets the base address of Uniform Resource Identifier (URI) of the Internet resource used when sending requests. - Returns .The base address of Uniform Resource Identifier (URI) of the Internet resource used when sending requests. - - - Cancel all pending requests on this instance. - - - Gets the headers which should be sent with each request. - Returns .The headers which should be sent with each request. - - - Send a DELETE request to the specified Uri. - Returns .The HTTP response message. - The Uri the request is sent to. - The request message was already sent by the instance. - - - Send a DELETE request to the specified Uri. - Returns .The HTTP response message. - The request message was already sent by the instance. - - - Send a DELETE request to the specified Uri as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The Uri the request is sent to. - - - Send a DELETE request to the specified Uri as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The Uri the request is sent to. - - - Releases the unmanaged resources and disposes of the managed resources used by the . - - - Releases the unmanaged resources used by the and optionally disposes of the managed resources. - true to release both managed and unmanaged resources; false to releases only unmanaged resources. - - - Send a GET request to the specified Uri. - Returns .The HTTP response message. - The Uri the request is sent to. - The request message was already sent by the instance. - - - Send a GET request to the specified Uri. - Returns .The HTTP response message. - The Uri the request is sent to. - The request message was already sent by the instance. - - - Send a GET request to the specified Uri as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The Uri the request is sent to. - The request message was already sent by the instance. - - - Send a GET request to the specified Uri as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The Uri the request is sent to. - The request message was already sent by the instance. - - - Gets or sets the maximum number of bytes to buffer when reading the response content. - Returns .The maximum number of bytes to buffer when reading the response content. - The size specified is less than or equal to zero. - An operation has already been started on the current instance. - The current instance has been disposed. - - - Send a POST request to the specified Uri. - Returns .The HTTP response message. - The Uri the request is sent to. - The HTTP request content sent to the server. - The request message was already sent by the instance. - - - Send a POST request to the specified Uri. - Returns .The HTTP response message. - The Uri the request is sent to. - The HTTP request content sent to the server. - The request message was already sent by the instance. - - - Send a POST request to the specified Uri as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The Uri the request is sent to. - The HTTP request content sent to the server. - The request message was already sent by the instance. - - - Send a POST request to the specified Uri as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The Uri the request is sent to. - The HTTP request content sent to the server. - The request message was already sent by the instance. - - - Send a PUT request to the specified Uri. - Returns .The HTTP response message. - The Uri the request is sent to. - The HTTP request content sent to the server. - The request message was already sent by the instance. - - - Send a PUT request to the specified Uri. - Returns .The HTTP response message. - The Uri the request is sent to. - The HTTP request content sent to the server. - The request message was already sent by the instance. - - - Send a PUT request to the specified Uri as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The Uri the request is sent to. - The HTTP request content sent to the server. - The request message was already sent by the instance. - - - Send a PUT request to the specified Uri as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The Uri the request is sent to. - The HTTP request content sent to the server. - The request message was already sent by the instance. - - - Send an HTTP request synchronously. - Returns .The HTTP response message. - The HTTP request message to send. - The request message was already sent by the instance. - - - Send an HTTP request synchronously. - Returns .The HTTP response message. - The HTTP request message to send. - When the operation should complete (as soon as a response is available or after reading the whole response content). - The request message was already sent by the instance. - - - Send an HTTP request synchronously. - Returns .The HTTP response message. - The HTTP request message to send. - When the operation should complete (as soon as a response is available or after reading the whole response content). - The cancellation token to cancel operation. - The request message was already sent by the instance. - - - Send an HTTP request synchronously. - Returns .The HTTP response message. - The HTTP request message to send. - The cancellation token to cancel operation. - The request message was already sent by the instance. - - - Send an HTTP request as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The HTTP request message to send. - The request message was already sent by the instance. - - - Send an HTTP request as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The HTTP request message to send. - When the operation should complete (as soon as a response is available or after reading the whole response content). - This operation will not block. The request message was already sent by the instance. - - - Send an HTTP request as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The HTTP request message to send. - When the operation should complete (as soon as a response is available or after reading the whole response content). - The cancellation token to cancel operation. - The request message was already sent by the instance. - - - Send an HTTP request as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The HTTP request message to send. - The cancellation token to cancel operation. - The request message was already sent by the instance. - - - Gets or sets the number of milliseconds to wait before the request times out. - Returns .The number of milliseconds to wait before the request times out. - The timeout specified is less than or equal to zero and is not . - An operation has already been started on the current instance. - The current instance has been disposed. - - - A base class for HTTP handler implementations. - - - Creates an instance of a class. - - - Gets or sets a value that indicates whether the handler should follow redirection responses. - Returns .true if the if the handler should follow redirection responses; otherwise false. The default value is true. - - - Gets or sets the type of decompression method used by the handler for automatic decompression of the HTTP content response. - Returns .The automatic decompression method used by the handler. The default value is . - - - Gets or sets the cookie container used to store server cookies by the handler. - Returns .The cookie container used to store server cookies by the handler. - - - Gets or sets authentication information used by this handler. - Returns .The authentication credentials associated with the handler. The default is null. - - - Releases the unmanaged resources used by the and optionally disposes of the managed resources. - true to release both managed and unmanaged resources; false to releases only unmanaged resources. - - - Gets or sets the maximum number of redirects that the handler follows. - Returns .The maximum number of redirection responses that the handler follows. The default value is 50. - - - Gets or sets the maximum request content buffer size used by the handler. - Returns .The maximum request content buffer size in bytes. The default value is 65,536 bytes. - - - Gets or sets a value that indicates whether the handler sends an Authorization header with the request. - Returns .true for the handler to send an HTTP Authorization header with requests after authentication has taken place; otherwise, false. The default is false. - - - Gets or sets proxy information used by the handler. - Returns .The proxy information used by the handler. The default value is null. - - - Creates an instance of based on the information provided in the . - Returns .The HTTP response message. - The HTTP request message. - A cancellation token to cancel the operation. - - - Creates an instance of based on the information provided in the as an operation that will not block. - Returns .The task object representing the asynchronous operation. - The HTTP request message. - A cancellation token to cancel the operation. - - - Gets a value that indicates whether the handler supports automatic response content decompression. - Returns .true if the if the handler supports automatic response content decompression; otherwise false. The default value is true. - - - Gets a value that indicates whether the handler supports proxy settings. - Returns .true if the if the handler supports proxy settings; otherwise false. The default value is true. - - - Gets a value that indicates whether the handler supports configuration settings for the and properties. - Returns .true if the if the handler supports configuration settings for the and properties; otherwise false. The default value is true. - - - Gets or sets a value that indicates whether the handler uses the property to store server cookies and uses these cookies when sending requests. - Returns .true if the if the handler supports uses the property to store server cookies and uses these cookies when sending requests; otherwise false. The default value is true. - - - Gets or sets a value that controls whether default credentials are sent with requests by the handler. - Returns .true if the default credentials are used; otherwise false. The default value is false. - - - Gets or sets a value that indicates whether the handler uses a proxy for requests. - Returns .true if the handler should use a proxy for requests; otherwise false. The default value is true. - - - Indicates if operations should be considered completed either as soon as a response is available, or after reading the entire response message including the content. - - - The operation should complete after reading the entire response including the content. - - - The operation should complete as soon as a response is available and headers are read. The content is not read yet. - - - A base class representing an HTTP entity body and content headers. - - - Initializes a new instance of the class. - - - Gets a stream representing the serialized HTTP content. - Returns .A stream representing the serialized HTTP content. - - - Write the HTTP content to a stream. - The target stream. - - - Write the HTTP content to a stream. - The target stream. - Information about the transport (channel binding token, for example). This parameter may be null. - - - Write the HTTP content to a stream as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The target stream. - - - Write the HTTP content to a stream as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The target stream. - Information about the transport (channel binding token, for example). This parameter may be null. - - - Buffer the te HTTP content to a memory stream. - Returns . - - - Releases the unmanaged resources and disposes of the managed resources used by the . - - - Releases the unmanaged resources used by the and optionally disposes of the managed resources. - true to release both managed and unmanaged resources; false to releases only unmanaged resources. - - - Gets the HTTP content headers as defined in RFC 2616. - Returns .The content headers as defined in RFC 2616. - - - Serialize the HTTP content to a memory buffer. - - - Serialize the HTTP content to a memory buffer. - The maximum size, in bytes, of the buffer to use. - - - Serialize the HTTP content to a memory buffer as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - - - Serialize the HTTP content to a memory buffer as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The maximum size, in bytes, of the buffer to use. - - - Return the HTTP content as byte array. - Returns .The HTTP content as byte array. - - - Return the HTTP content as string. - Returns .The HTTP content as a string. - - - Serialize the HTTP content to a stream. - The target stream. - Information about the transport (channel binding token, for example). This parameter may be null. - - - Serialize the HTTP content to a stream as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The target stream. - Information about the transport (channel binding token, for example). This parameter may be null. - - - Determines whether the HTTP content has a valid length in bytes. - Returns .true if is a valid length; otherwise, false. - The length in bytes of the HHTP content. - - - A base type for HTTP message handlers. - - - Initializes a new instance of the class. - - - Releases the unmanaged resources and disposes of the managed resources used by the . - - - Releases the unmanaged resources used by the and optionally disposes of the managed resources. - true to release both managed and unmanaged resources; false to releases only unmanaged resources. - - - Send an HTTP message synchronously. - Returns .The HTTP response message. - The HTTP message to send. - The cancellation token to cancel operation. - - - Send an HTTP request as an asynchronous operation. - Returns .The task object representing the asynchronous operation. - The HTTP request message to send. - The cancellation token to cancel operation. - - - A helper class for retrieving and comparing standard HTTP methods. - - - Initializes a new instance of the class with a specific HTTP method. - The HTTP method. - - - Represents an HTTP DELETE protocol method. - Returns . - - - Returns . - - - Returns . - - - Represents an HTTP GET protocol method. - Returns . - - - Returns . - - - Represents an HTTP HEAD protocol method. The HEAD method is identical to GET except that the server only returns message-headers in the response, without a message-body. - Returns . - - - An HTTP method. - Returns .An HTTP method represented as a . - - - Returns . - - - Returns . - - - Represents an HTTP OPTIONS protocol method. - Returns . - - - Represents an HTTP POST protocol method that is used to post a new entity as an addition to a URI. - Returns . - - - Represents an HTTP PUT protocol method that is used to replace an entity identified by a URI. - Returns . - - - Returns a string that represents the current object. - Returns .A string representing the current object. - - - Represents an HTTP TRACE protocol method. - Returns . - - - A base class for exceptions thrown by the and classes. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class with a specific message that describes the current exception. - A message that describes the current exception. - - - Initializes a new instance of the class with a specific message that describes the current exception and an inner exception. - A message that describes the current exception. - The inner exception. - - - Represents a HTTP request message. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class with an HTTP method and a request . - The HTTP method. - A string that represents the request . - - - Initializes a new instance of the class with an HTTP method and a request . - The HTTP method. - The to request. - - - Gets or sets the contents of the HTTP message. - Returns .The content of a message - - - Releases the unmanaged resources and disposes of the managed resources used by the . - - - Releases the unmanaged resources used by the and optionally disposes of the managed resources. - true to release both managed and unmanaged resources; false to releases only unmanaged resources. - - - Gets the collection of HTTP request headers. - Returns .The collection of HTTP request headers. - - - Gets or sets the HTTP method used by the HTTP request message. - Returns .The HTTP method used by the request message. The default is the GET method. - - - Gets a set of properties for the HTTP request. - Returns . - - - Gets or sets the used for the HTTP request. - Returns .The used for the HTTP request. - - - Returns a string that represents the current object. - Returns .A string representation of the current object. - - - Gets or sets the HTTP message version. - Returns .The HTTP message version. The default is 1.1. - - - Represents a HTTP response message. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class with a specific . - The status code of the HTTP response. - - - Gets or sets the content of a HTTP response message. - Returns .The content of the HTTP response message. - - - Releases the unmanaged resources and disposes of unmanaged resources used by the . - - - Releases the unmanaged resources used by the and optionally disposes of the managed resources. - true to release both managed and unmanaged resources; false to releases only unmanaged resources. - - - Throws an exception if the property for the HTTP response is false. - Returns .The HTTP response message if the call is successful. - - - Gets the collection of HTTP response headers. - Returns .The collection of HTTP response headers. - - - Gets a value that indicates if the HTTP response was successful. - Returns .A value that indicates if the HTTP response was successful. true if was in the range 200-299; otherwise false. - - - Gets or sets the reason phrase which typically is sent by servers together with the status code. - Returns .The reason phrase sent by the server. - - - Gets or sets the request message which led to this response message. - Returns .The request message which led to this response message. - - - Gets or sets the status code of the HTTP response. - Returns .The status code of the HTTP response. - - - Returns a string that represents the current object. - Returns .A string representation of the current object. - - - Gets or sets the HTTP message version. - Returns .The HTTP message version. The default is 1.1. - - - A base type for handlers which only do some small processing of request and/or response messages. - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Provides a collection of objects that get serialized using the multipart/* content type specification. - - - - - - - Returns . - - - - Returns . - - - Returns . - - - Returns . - - - Provides a container for content encoded using multipart/form-data MIME type. - - - - - - - - Provides HTTP content based on a stream. - - - - - Returns . - - - - - Returns . - - - Returns . - - - Provides HTTP content based on a string. - - - - - - Represents authentication information in Authorization, ProxyAuthorization, WWW-Authneticate, and Proxy-Authenticate header values. - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents the value of the Cache-Control header. - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents the value of the Content-Range header. - - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents an entity-tag header value. - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents the collection of Content Headers as defined in RFC 2616. - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - A collection of headers and their values as defined in RFC 2616. - - - - - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a collection of header values. - - - - - - Returns . - - - - Returns . - - - Returns . - - - Returns . - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents the collection of Request Headers as defined in RFC 2616. - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents the collection of Response Headers as defined in RFC 2616. - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a media-type as defined in the RFC 2616. - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a content-type header value with an additional quality. - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a name/value pair. - - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a name/value pair with parameters. - - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a product header value. - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a value which can either be a product or a comment. - - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a header value which can either be a date/time or an entity-tag value. - - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents the value of the Range header. - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a byte-range header value. - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a header value which can either be a date/time or a timespan value. - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a string header value with an optional quality. - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a transfer-coding header value. - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a transfer-coding header value with optional quality. - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents the value of a Via header. - - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Represents a warning value used by the Warning header. - - - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - Returns . - - - \ No newline at end of file diff --git a/Plugins/WP8/WindowsPhone8UnityAdapter.dll b/Plugins/WP8/WindowsPhone8UnityAdapter.dll deleted file mode 100755 index a1fcf3a7f..000000000 Binary files a/Plugins/WP8/WindowsPhone8UnityAdapter.dll and /dev/null differ diff --git a/Plugins/WP8/ar-SA/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/ar-SA/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 22f1bb936..000000000 Binary files a/Plugins/WP8/ar-SA/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/az-Latn-AZ/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/az-Latn-AZ/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index da1cadba2..000000000 Binary files a/Plugins/WP8/az-Latn-AZ/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/be-BY/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/be-BY/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 545453918..000000000 Binary files a/Plugins/WP8/be-BY/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/bg-BG/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/bg-BG/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 4252722e3..000000000 Binary files a/Plugins/WP8/bg-BG/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/ca-ES/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/ca-ES/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index cf30a334b..000000000 Binary files a/Plugins/WP8/ca-ES/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/cs-CZ/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/cs-CZ/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 1a942f282..000000000 Binary files a/Plugins/WP8/cs-CZ/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/da-DK/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/da-DK/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 9f3218115..000000000 Binary files a/Plugins/WP8/da-DK/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/de-DE/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/de-DE/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 63224afef..000000000 Binary files a/Plugins/WP8/de-DE/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/el-GR/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/el-GR/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index a9d3dbfdd..000000000 Binary files a/Plugins/WP8/el-GR/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/en-GB/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/en-GB/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index e9c12c8cd..000000000 Binary files a/Plugins/WP8/en-GB/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/es-ES/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/es-ES/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index f8b5eb634..000000000 Binary files a/Plugins/WP8/es-ES/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/es-MX/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/es-MX/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index b2d01a8d6..000000000 Binary files a/Plugins/WP8/es-MX/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/et-EE/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/et-EE/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 1e2f2679a..000000000 Binary files a/Plugins/WP8/et-EE/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/fa-IR/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/fa-IR/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index eee1fd689..000000000 Binary files a/Plugins/WP8/fa-IR/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/fi-FI/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/fi-FI/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index a9207cfd6..000000000 Binary files a/Plugins/WP8/fi-FI/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/fil-PH/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/fil-PH/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 2957c33fd..000000000 Binary files a/Plugins/WP8/fil-PH/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/fr-CA/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/fr-CA/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 22eebbad4..000000000 Binary files a/Plugins/WP8/fr-CA/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/fr-FR/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/fr-FR/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 7f699636a..000000000 Binary files a/Plugins/WP8/fr-FR/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/he-IL/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/he-IL/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 9197408d3..000000000 Binary files a/Plugins/WP8/he-IL/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/hi-IN/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/hi-IN/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 7e5198296..000000000 Binary files a/Plugins/WP8/hi-IN/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/hr-HR/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/hr-HR/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index e933cb846..000000000 Binary files a/Plugins/WP8/hr-HR/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/hu-HU/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/hu-HU/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 5622e7c46..000000000 Binary files a/Plugins/WP8/hu-HU/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/id-ID/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/id-ID/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 4be733d68..000000000 Binary files a/Plugins/WP8/id-ID/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/it-IT/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/it-IT/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index ebb1e095c..000000000 Binary files a/Plugins/WP8/it-IT/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/ja-JP/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/ja-JP/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 537bf30b5..000000000 Binary files a/Plugins/WP8/ja-JP/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/kk-KZ/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/kk-KZ/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 78a61e482..000000000 Binary files a/Plugins/WP8/kk-KZ/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/ko-KR/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/ko-KR/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index c59e054a9..000000000 Binary files a/Plugins/WP8/ko-KR/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/lt-LT/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/lt-LT/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 5223cb747..000000000 Binary files a/Plugins/WP8/lt-LT/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/lv-LV/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/lv-LV/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 779d647d4..000000000 Binary files a/Plugins/WP8/lv-LV/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/mk-MK/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/mk-MK/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 52dfafbaa..000000000 Binary files a/Plugins/WP8/mk-MK/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/ms-MY/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/ms-MY/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index db6463538..000000000 Binary files a/Plugins/WP8/ms-MY/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/nb-NO/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/nb-NO/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 1e595ff07..000000000 Binary files a/Plugins/WP8/nb-NO/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/nl-NL/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/nl-NL/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index a98409501..000000000 Binary files a/Plugins/WP8/nl-NL/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/pl-PL/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/pl-PL/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index c71096bbe..000000000 Binary files a/Plugins/WP8/pl-PL/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/pt-BR/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/pt-BR/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 0e749b5c0..000000000 Binary files a/Plugins/WP8/pt-BR/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/pt-PT/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/pt-PT/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index ccadfe387..000000000 Binary files a/Plugins/WP8/pt-PT/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/ro-RO/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/ro-RO/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 59dd55864..000000000 Binary files a/Plugins/WP8/ro-RO/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/ru-RU/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/ru-RU/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index ce1064820..000000000 Binary files a/Plugins/WP8/ru-RU/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/sk-SK/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/sk-SK/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 803c22e53..000000000 Binary files a/Plugins/WP8/sk-SK/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/sl-SI/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/sl-SI/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index d5614bf99..000000000 Binary files a/Plugins/WP8/sl-SI/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/sq-AL/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/sq-AL/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 4fc239a8c..000000000 Binary files a/Plugins/WP8/sq-AL/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/sr-Latn-CS/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/sr-Latn-CS/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index c35ec5571..000000000 Binary files a/Plugins/WP8/sr-Latn-CS/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/sv-SE/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/sv-SE/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 804848723..000000000 Binary files a/Plugins/WP8/sv-SE/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/th-TH/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/th-TH/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 7a1fd7828..000000000 Binary files a/Plugins/WP8/th-TH/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/tr-TR/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/tr-TR/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 188406582..000000000 Binary files a/Plugins/WP8/tr-TR/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/uk-UA/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/uk-UA/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 65abb3d81..000000000 Binary files a/Plugins/WP8/uk-UA/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/uz-Latn-UZ/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/uz-Latn-UZ/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 9c956ba0f..000000000 Binary files a/Plugins/WP8/uz-Latn-UZ/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/vi-VN/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/vi-VN/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index cfe9a3684..000000000 Binary files a/Plugins/WP8/vi-VN/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/zh-CN/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/zh-CN/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 82fd6b686..000000000 Binary files a/Plugins/WP8/zh-CN/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WP8/zh-TW/Microsoft.Phone.Controls.Toolkit.resources.dll b/Plugins/WP8/zh-TW/Microsoft.Phone.Controls.Toolkit.resources.dll deleted file mode 100755 index 67dba33af..000000000 Binary files a/Plugins/WP8/zh-TW/Microsoft.Phone.Controls.Toolkit.resources.dll and /dev/null differ diff --git a/Plugins/WindowsPhone8UnityAdapter.dll b/Plugins/WindowsPhone8UnityAdapter.dll deleted file mode 100755 index 4bf2b98ee..000000000 Binary files a/Plugins/WindowsPhone8UnityAdapter.dll and /dev/null differ diff --git a/README.md b/README.md index 6f25a3b7c..f05df7840 100644 --- a/README.md +++ b/README.md @@ -71,14 +71,6 @@ Next, we'll need to make some modifications to your generated `Classes\AppContro As you make updates to your app from Unity, you should choose the same location to generate the Xcode project each time. Unity will prompt you to replace or append the existing folder. If you choose "Append," you shouldn't have to redo any of your Appboy setup in the future. -## Windows Phone 8 Setup - -Once you have placed the plugin DLLs in the proper location in your Unity project, build your Windows Phone 8 application from your Unity project. You will then have a working Windows Phone 8 XAML application with the required Appboy plugin DLLs referenced from your project. - -You can then follow the normal integration instructions found here, with the following exception: - -Note: Unity does processing and modification of Windows Phone 8 plugin DLLs. As a result, you must use the DLLs that are output from the Unity build; do not replace a DLL with a different version after you've built from Unity. In particular, if you are using our UI library, you must modify the references to point at the DLLs unity outputs (not the ones found using Nuget). If you need to update a DLL version, you can place it in the ```Plugins/WP8``` directory and then use the ones output from Unity. - ## Windows Universal Setup Once you have placed the plugin DLLs in the proper location in your Unity project, build your Windows Store or Phone 8.1 application from your Unity project. You will then have a working XAML application with the required Appboy plugin DLLs referenced from your project. diff --git a/scripts/generate_package.sh b/scripts/generate_package.sh new file mode 100755 index 000000000..3fa9e1a95 --- /dev/null +++ b/scripts/generate_package.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +APPBOY_IOS_SDK="AppboyKit" +SD_WEB_IMAGE="SDWebImage.framework" +PROJECT_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd ) +LIBRARIES_PATH=$PROJECT_ROOT/Libraries +IOS_PLUGINS_PATH=$PROJECT_ROOT/Assets/Plugins/iOS + +UNITY_PATH="/Applications/Unity/Unity.app/Contents/MacOS/Unity" +# 64 bit Windows - "C:\Program Files\Unity\Editor\Unity.exe" +# 32 bit Windows - "C:\Program Files (x86)\Unity\Editor\Unity.exe" + +EXCLUDE_DEPENDENCIES=false # Include dependencies from the Appboy iOS SDK in Unity package +if [[ $1 = "--nodeps" ]]; then + EXCLUDE_DEPENDENCIES=true +fi + +echo "Deleting iOS libraries from Assets/Plugins/iOS/" +[ -e $IOS_PLUGINS_PATH/$APPBOY_IOS_SDK ] && rm -rf $IOS_PLUGINS_PATH/$APPBOY_IOS_SDK* +[ -e $IOS_PLUGINS_PATH/$SD_WEB_IMAGE ] && rm -rf $IOS_PLUGINS_PATH/$SD_WEB_IMAGE* + +echo "Copying iOS libraries from Libraries/ to Assets/Plugins/iOS/" +cp -R $LIBRARIES_PATH/$APPBOY_IOS_SDK/ $IOS_PLUGINS_PATH/$APPBOY_IOS_SDK/ & +if [ "$EXCLUDE_DEPENDENCIES" = false ]; then + cp -R $LIBRARIES_PATH/$SD_WEB_IMAGE $IOS_PLUGINS_PATH/$SD_WEB_IMAGE +fi & +wait + +echo "Generating Unity package..." +if [ "$EXCLUDE_DEPENDENCIES" = false ]; then + $UNITY_PATH -batchmode -nographics -projectPath $PROJECT_ROOT -executeMethod Appboy.Editor.Build.ExportPackage -quit && echo "Unity Package exported to $PROJECT_ROOT/unity-package/Appboy.unity-package" || echo "Failed to export package" +else + $UNITY_PATH -batchmode -nographics -projectPath $PROJECT_ROOT -executeMethod Appboy.Editor.Build.ExportPackageWithoutDependencies -quit && echo "Unity Package exported to $PROJECT_ROOT/unity-package/Appboy-nodeps.unity-package" || echo "Failed to export package" +fi