-
Notifications
You must be signed in to change notification settings - Fork 9
Strong name signing of assemblies #18
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright © myCSharp 2020-2021, all rights reserved | ||
|
||
namespace System.Diagnostics.CodeAnalysis | ||
{ | ||
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)] | ||
internal sealed class NotNullWhenAttribute : Attribute | ||
{ | ||
public NotNullWhenAttribute(bool returnValue) => this.ReturnValue = returnValue; | ||
|
||
public bool ReturnValue { get; } | ||
} | ||
} | ||
|
||
namespace MyCSharp.HttpUserAgentParser | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
internal static class Extensions | ||
{ | ||
public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> kvp, out TKey key, out TValue value) | ||
{ | ||
key = kvp.Key; | ||
value = kvp.Value; | ||
} | ||
|
||
public static bool Contains(this string instance, string value, StringComparison comparison) | ||
=> instance.IndexOf(value, comparison) >= 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought Contains is now more efficient, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is for .NET Standard 2.0 (see filename) as this the string.Contains API with the StringComparison is .NS 2.1. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is only built iif .netstandard2.0, and there the rule shouldn't fire as the suitable overload doesn't exist. For .NS 2.1 we use |
||
} | ||
gfoidl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No errors (in local build) 😃
Edit: ah shit, Debug build, hence no XML comments...CI fails. Will have a look.Shall we keep it enabled?
(Personally I prefer this -- on some projects, not always)