Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify cmdlets with parameter 'Encoding' to be of type System.Text.Encoding #5080

Merged

Commits on Oct 23, 2017

  1. Unify cmdlets with parameter 'Encoding' to be of type System.Text.Enc…

    …oding
    
    Created support classes so tab completion would continue to wor
    Create an ArgumentTransformationAttribute for the parameter to accept the currently used strings
    Register encoding providers on all platforms. This seems safe enough, and there are defintely more
    encodings available on CoreFX after this is done, which will be useful for some of the web cmdlet scenarios
    
    Validate that files are created with UTF-8 encoding without BOM
    Update tests to validate Encoding parameter to new type and create new tests for
    parameter type validation.
    JamesWTruher committed Oct 23, 2017
    Copy the full SHA
    bcc2719 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    431370a View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    53b31e9 View commit details
    Browse the repository at this point in the history
  4. Change the encoding to utf8 when the converter gets an empty string

    refactor encoding class and other encoding utilities into new file
    update redirection operator tests to
    convert string matching for encoding into dictionary, which should make it more efficient
    JamesWTruher committed Oct 23, 2017
    Copy the full SHA
    6ef8580 View commit details
    Browse the repository at this point in the history
  5. Change Encoding to remove byte as a possible encoding value

    Add a new parameter to the filesystem provider cmdlets to indicate whether we want a byte stream
    Unify Send-MailMessage with other cmdlets
    JamesWTruher committed Oct 23, 2017
    Copy the full SHA
    e29baac View commit details
    Browse the repository at this point in the history
  6. Changed -Byte parameter to -AsByteStream

    Created a warning when both -AsByteStream and -Encoding are used together
    updated tests to check that the warning is emitted
    JamesWTruher committed Oct 23, 2017
    Copy the full SHA
    b59b0ee View commit details
    Browse the repository at this point in the history
  7. put ValidateNotNullOrEmpty attribute on Encoding parameters

    Also improve encoding completion to handle wildcards
    Also make sure that Encoding parameters are properties rather than fields.
    Remove unused OpenStreamReader which takes a string since it's no longer in use
    JamesWTruher committed Oct 23, 2017
    Copy the full SHA
    840343d View commit details
    Browse the repository at this point in the history
  8. Change from IArgumentCompleter attribute to ArgumentCompletions attri…

    …bute for encoding attribute.
    
    Simplify logic for converting string to encoding
    JamesWTruher committed Oct 23, 2017
    Copy the full SHA
    007bae4 View commit details
    Browse the repository at this point in the history