PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/Languages/IronPython/IronPython/Runtime/BytesConversionAttribute.cs

http://github.com/IronLanguages/main
C# | 37 lines | 11 code | 3 blank | 23 comment | 0 complexity | 04a1075e6ba9ab54318c6f0c227913c2 MD5 | raw file
Possible License(s): CPL-1.0, BSD-3-Clause, ISC, GPL-2.0, MPL-2.0-no-copyleft-exception
  1. /* ****************************************************************************
  2. *
  3. * Copyright (c) Microsoft Corporation.
  4. *
  5. * This source code is subject to terms and conditions of the Apache License, Version 2.0. 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 Apache License, Version 2.0, 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 Apache License, Version 2.0.
  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. }