void CreateRegistration(string deviceIdentifier, Platform platform, string pnsHandle, IList <string> tags) { if (string.IsNullOrEmpty(pnsHandle)) { throw new ArgumentException(nameof(pnsHandle)); } if (string.IsNullOrEmpty(deviceIdentifier)) { throw new ArgumentException(nameof(deviceIdentifier)); } var install = new Installation { Platform = GetNotificationPlatform(platform), InstallationId = deviceIdentifier, PushChannel = pnsHandle, Tags = tags ?? new List <string>(), Templates = GetTemplatesForPlatform(platform) }; hubClient.CreateOrUpdateInstallation(install); }