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

Remove IPlatformServices.GetHash #2707

Merged
merged 5 commits into from
Oct 22, 2021
Merged

Remove IPlatformServices.GetHash #2707

merged 5 commits into from
Oct 22, 2021

Conversation

mattleibow
Copy link
Member

@mattleibow mattleibow commented Sep 27, 2021

Description of Change

Remove the usage of IPlatformServices.GetHash in favo[u]r of the IHashAlgorithm service.

Part of #1965

Additions made

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)
  • Targets a single property for a single control (or intertwined few properties)
  • Adds the property to the appropriate interface
  • Avoids any changes not essential to the handler property
  • Adds the mapping to the PropertyMapper in the handler
  • Adds the mapping method to the Android, iOS, and Standard aspects of the handler
  • Implements the actual property updates (usually in extension methods in the Platform section of Core)
  • Tags ported renderer methods with [PortHandler]
  • Adds an example of the property to the sample project (MainPage)
  • Adds the property to the stub class
  • Implements basic property tests in DeviceTests

Does this PR touch anything that might affect accessibility?

  • Does this PR introduce a new control? (If yes, add an example using SemanticProperties to the SemanticsPage)
  • APIs that modify focusability?
  • APIs that modify any text property on a control?
  • Does this PR modify view nesting or view arrangement in anyway?
  • Is there the smallest possibility that your PR will change accessibility?
  • I'm not sure, please help me

If any of the above checkboxes apply to your PR, then the PR will need to provide testing to demonstrate that accessibility still works.

@mattleibow mattleibow added this to the 6.0.101-preview.10 milestone Sep 28, 2021
@mattleibow mattleibow marked this pull request as ready for review October 4, 2021 11:54
commit 9770d8e
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Mon Oct 4 13:58:48 2021 +0200

    ws

commit 80460b1
Merge: 056d8e7 6d90b87
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Mon Oct 4 13:52:11 2021 +0200

    Merge remote-tracking branch 'origin/main' into dev/remove-gethash

commit 056d8e7
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Mon Sep 27 12:34:48 2021 +0200

    Remove GetHash and GetMD5Hash

commit b9ce663
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sun Sep 26 00:40:48 2021 +0200

    same names

commit 54f9663
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sun Sep 26 00:11:04 2021 +0200

    This is not a useful property

    A view could have a window as a parent.

commit e5402cc
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sat Sep 25 23:58:54 2021 +0200

    that

commit 34d072f
Merge: 2aaa7a4 7961bf1
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sat Sep 25 23:51:57 2021 +0200

    Merge branch 'main' into dev/apphandler

commit 2aaa7a4
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sat Sep 25 16:58:50 2021 +0200

    Fix the device tests

commit 0e8f3d6
Merge: fa3c3fb 408646e
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sat Sep 25 15:56:15 2021 +0200

    Merge remote-tracking branch 'origin/main' into dev/apphandler

commit fa3c3fb
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sat Sep 25 02:34:49 2021 +0200

    MacCat can terminate

commit 94c506e
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sat Sep 25 01:40:21 2021 +0200

    oops

commit 2ad5aaf
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sat Sep 25 01:33:13 2021 +0200

    this

commit 3e1221e
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sat Sep 25 01:15:01 2021 +0200

    Overloads not supported anymore

commit ed5d8eb
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sat Sep 25 00:42:42 2021 +0200

    BetterName

commit 22da1ef
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sat Sep 25 00:42:18 2021 +0200

    oops

commit dd76b6d
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Sat Sep 25 00:41:59 2021 +0200

    Clean up a few things

commit 742e1ff
Merge: 894a3c8 e0129e9
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Fri Sep 24 23:52:50 2021 +0200

    Merge remote-tracking branch 'origin/main' into dev/apphandler

commit 894a3c8
Merge: 6abf1aa c7b06fa
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Fri Sep 24 23:51:35 2021 +0200

    Merge remote-tracking branch 'origin/main' into dev/apphandler

commit 6abf1aa
Author: Shane Neuville <shneuvil@microsoft.com>
Date:   Thu Sep 23 09:17:20 2021 -0500

    - fix shadowing

commit 7a129a1
Merge: dbf04d5 e21ef19
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 06:32:38 2021 +0200

    Merge branch 'dev/openuriaction' into dev/apphandler

    # Conflicts:
    #	src/Core/src/Platform/MauiContext.Android.cs

commit e21ef19
Merge: 0128287 53809a2
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 06:31:33 2021 +0200

    Merge remote-tracking branch 'origin/main' into dev/openuriaction

commit 0128287
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 06:30:54 2021 +0200

    fix the test

commit dbf04d5
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 06:16:16 2021 +0200

    comment

commit 6c6f8e0
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 06:13:42 2021 +0200

    Pass it all along

commit 7fe0ad0
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 05:53:51 2021 +0200

    Add ApplicationHandler

    Remove IPlatformServices.QuitApplication()

commit fb5d222
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 04:55:44 2021 +0200

    ns

commit bf3144e
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 04:01:27 2021 +0200

    oops

commit 5ea88ed
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 03:21:22 2021 +0200

    more oops

commit 6c0157a
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 03:20:35 2021 +0200

    oops

commit 2b10661
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 03:04:43 2021 +0200

    move to the correct folder

commit 3cd14af
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 02:32:19 2021 +0200

    remove more

commit a82ccd9
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 02:30:42 2021 +0200

    Remove Flags and SetFlags

commit 1c5cb5a
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Thu Sep 23 02:29:59 2021 +0200

    Don't use flags for this

commit 7f41710
Author: Matthew Leibowitz <mattleibow@live.com>
Date:   Wed Sep 22 17:21:00 2021 +0200

    Remove Device.OpenUri
@Redth
Copy link
Member

Redth commented Oct 19, 2021

Feeling a bit conflicted on this one... Do we really need this to be a service? The Crc64 algorithm is pretty settled on in terms of what we're going to use long term. Android team did some testing on this when we were replacing Md5 usages and this was a pretty efficient method to use.

I think we should also avoid the terminology of hash here, as the intent is very specifically for non-cryptographic hashing purposes and having a service named for hashing could be a bit ambiguous and imply something it's not.

I think we should drop the whole service/interface for this, and just make it:

public static class Crc64
{
    public byte[] Compute(byte[] input) { /* .. */ }
    public byte[] Compute(Stream inputStream) { /* .. */ }
    public string Compute(string input) { /* .. */ }
}

@Redth Redth merged commit c90bb84 into main Oct 22, 2021
@Redth Redth deleted the dev/remove-gethash branch October 22, 2021 11:57
@samhouts samhouts added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label Aug 28, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 21, 2023
@samhouts samhouts added the fixed-in-6.0.101-preview.10 Look for this fix in 6.0.101-preview.10! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-6.0.101-preview.10 Look for this fix in 6.0.101-preview.10! migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants