NotificationXmlElementAttribute.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. // ******************************************************************
  2. // Copyright (c) Microsoft. All rights reserved.
  3. // This code is licensed under the MIT License (MIT).
  4. // THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
  5. // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  6. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  7. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  8. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  9. // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
  10. // THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
  11. // ******************************************************************
  12. using System;
  13. #if WINDOWS_UWP
  14. #endif
  15. namespace Microsoft.Toolkit.Uwp.Notifications
  16. {
  17. internal sealed class NotificationXmlElementAttribute : Attribute
  18. {
  19. public string Name { get; private set; }
  20. public NotificationXmlElementAttribute(string name)
  21. {
  22. if (string.IsNullOrWhiteSpace(name))
  23. {
  24. throw new ArgumentNullException("name cannot be null or whitespace");
  25. }
  26. Name = name;
  27. }
  28. }
  29. }