PageRenderTime 49ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/DICK.B1/IronPython/Runtime/BytesConversionAttribute.cs

https://bitbucket.org/williamybs/uidipythontool
C# | 37 lines | 11 code | 3 blank | 23 comment | 0 complexity | 26e7e21feb0c501b3395acda92f2f6a3 MD5 | raw file
  1. /* ****************************************************************************
  2. *
  3. * Copyright (c) Microsoft Corporation.
  4. *
  5. * This source code is subject to terms and conditions of the Microsoft Public License. A
  6. * copy of the license can be found in the License.html file at the root of this distribution. If
  7. * you cannot locate the Microsoft Public License, please send an email to
  8. * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound
  9. * by the terms of the Microsoft Public License.
  10. *
  11. * You must not remove this notice, or any other, from this software.
  12. *
  13. *
  14. * ***************************************************************************/
  15. using System;
  16. using System.Collections.Generic;
  17. using System.Text;
  18. namespace IronPython {
  19. /// <summary>
  20. /// For IList<byte/> arguments: Marks that the argument is typed to accept a bytes or
  21. /// bytearray object. This attribute disallows passing a Python list object and
  22. /// auto-applying our generic conversion. It also enables conversion of a string to
  23. /// a IList of byte in IronPython 2.6.
  24. ///
  25. /// For string arguments: Marks that the argument is typed to accept a bytes object
  26. /// as well. (2.6 only)
  27. /// </summary>
  28. [AttributeUsage(AttributeTargets.Parameter)]
  29. public sealed class BytesConversionAttribute : Attribute {
  30. }
  31. [AttributeUsage(AttributeTargets.Parameter)]
  32. public sealed class BytesConversionNoStringAttribute : Attribute {
  33. }
  34. }