Skip to content

Commit

Permalink
improve seo (dotnet#28866)
Browse files Browse the repository at this point in the history
  • Loading branch information
gewarren authored Mar 31, 2022
1 parent 6ac858f commit 8d65fd8
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: "Quantifier Operations (C#)"
description: Learn about quantifier operations. These operations return a Boolean value indicating whether some or all elements in a sequence satisfy a condition.
ms.date: 07/20/2015
ms.assetid: 84ac2ac2-7a63-4581-bc4c-14e34be1493b
titleSuffix: LINQ
description: Learn about quantifier operations in LINQ. These methods, 'All', 'Any', and 'Contains', return a Boolean value indicating whether some or all elements in a sequence satisfy a condition.
ms.date: 03/30/2022
---
# Quantifier Operations (C#)
# Quantifier operations in LINQ (C#)

Quantifier operations return a <xref:System.Boolean> value that indicates whether some or all of the elements in a sequence satisfy a condition.

Expand All @@ -18,9 +18,9 @@ Quantifier operations return a <xref:System.Boolean> value that indicates whethe

|Method Name|Description|C# Query Expression Syntax|More Information|
|-----------------|-----------------|---------------------------------|----------------------|
|All|Determines whether all the elements in a sequence satisfy a condition.|Not applicable.|<xref:System.Linq.Enumerable.All%2A?displayProperty=nameWithType><br /><br /> <xref:System.Linq.Queryable.All%2A?displayProperty=nameWithType>|
|Any|Determines whether any elements in a sequence satisfy a condition.|Not applicable.|<xref:System.Linq.Enumerable.Any%2A?displayProperty=nameWithType><br /><br /> <xref:System.Linq.Queryable.Any%2A?displayProperty=nameWithType>|
|Contains|Determines whether a sequence contains a specified element.|Not applicable.|<xref:System.Linq.Enumerable.Contains%2A?displayProperty=nameWithType><br /><br /> <xref:System.Linq.Queryable.Contains%2A?displayProperty=nameWithType>|
|All|Determines whether all the elements in a sequence satisfy a condition.|Not applicable.|<xref:System.Linq.Enumerable.All%2A?displayProperty=nameWithType><br /><xref:System.Linq.Queryable.All%2A?displayProperty=nameWithType>|
|Any|Determines whether any elements in a sequence satisfy a condition.|Not applicable.|<xref:System.Linq.Enumerable.Any%2A?displayProperty=nameWithType><br /><xref:System.Linq.Queryable.Any%2A?displayProperty=nameWithType>|
|Contains|Determines whether a sequence contains a specified element.|Not applicable.|<xref:System.Linq.Enumerable.Contains%2A?displayProperty=nameWithType><br /><xref:System.Linq.Queryable.Contains%2A?displayProperty=nameWithType>|

## Query Expression Syntax Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ms.assetid: a8fa49a1-6e78-4a09-87e5-84a0b9f5ffbe
---
# Generic Interfaces (C# Programming Guide)

It is often useful to define interfaces either for generic collection classes, or for the generic classes that represent items in the collection. The preference for generic classes is to use generic interfaces, such as <xref:System.IComparable%601> rather than <xref:System.IComparable>, in order to avoid boxing and unboxing operations on value types. The .NET class library defines several generic interfaces for use with the collection classes in the <xref:System.Collections.Generic> namespace.
It is often useful to define interfaces either for generic collection classes, or for the generic classes that represent items in the collection. To avoid boxing and unboxing operations on value types, it's better to use [generic interfaces](../../../standard/generics/interfaces.md), such as <xref:System.IComparable%601>, on generic classes. The .NET class library defines several generic interfaces for use with the collection classes in the <xref:System.Collections.Generic> namespace. For more information about these interfaces, see [Generic interfaces](../../../standard/generics/interfaces.md).

When an interface is specified as a constraint on a type parameter, only types that implement the interface can be used. The following code example shows a `SortedList<T>` class that derives from the `GenericList<T>` class. For more information, see [Introduction to Generics](../../fundamentals/types/generics.md). `SortedList<T>` adds the constraint `where T : IComparable<T>`. This enables the `BubbleSort` method in `SortedList<T>` to use the generic <xref:System.IComparable%601.CompareTo%2A> method on list elements. In this example, list elements are a simple class, `Person`, that implements `IComparable<Person>`.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
---
description: "Learn more about: How to: Obtain a Certificate (WCF)"
description: Learn the different ways to obtain an X.509 certificate in Windows Communication Foundation (WCF).
title: "How to: Obtain a Certificate (WCF)"
ms.date: "03/30/2017"
ms.date: 03/30/2022
helpviewer_keywords:
- "certificates [WCF], obtaining"
ms.assetid: d53762fd-15ea-42dc-b0ea-6a6597aa23f7
---
# How to: Obtain a Certificate (WCF)
# How to: Obtain a certificate (WCF)

To use any of the Windows Communication Foundation (WCF) features of that use X.509 certificates, you just first obtain certificates.
To use any of the Windows Communication Foundation (WCF) features that use X.509 certificates, you must first obtain certificates.

## Obtain an X.509 certificate

Choose one of the following:

- Purchase a certificate from a certification authority, such as VeriSign, Inc.

- Set up your own certificate service and have a certification authority sign the certificates. Windows Server 2003, Windows 2000 Server, Windows 2000 Server Datacenter, and Windows 2000 Datacenter Server all include certificate services that support public key infrastructure (PKI). In Windows Server 2008, use the [Active Directory Certificate Services](/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc731564(v=ws.10)) role to manage a certification authority.
- Set up your own certificate service and have a certification authority sign the certificates. In Windows Server, use the [Active Directory Certificate Services](/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831740(v=ws.11)) role to manage a certification authority.

- Set up your own certificate service and do not have the certificates signed.

> [!NOTE]
> Whichever approach you take, the recipient of the SOAP request that contains the X.509 certificate must trust the X.509 certificate. This means that the X.509 certificate or an issuer in the certificate chain is in the Trusted People certificate store and that the X.509 certificate is not in the Untrusted Certificates store.
> Whichever approach you take, the recipient of the SOAP request that contains the X.509 certificate must trust the X.509 certificate. This means that the X.509 certificate or an issuer in the certificate chain is in the Trusted People certificate store, and that the X.509 certificate is not in the Untrusted Certificates store.
## See also

Expand Down
8 changes: 4 additions & 4 deletions docs/standard/design-guidelines/type.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: "Learn more about: Type Design Guidelines"
title: "Type Design Guidelines"
description: Learn more about designing types and classes in .NET.
title: Class design guidelines for .NET
ms.date: "10/22/2008"
helpviewer_keywords:
- "type design guidelines"
Expand All @@ -9,7 +9,7 @@ helpviewer_keywords:
- "types [.NET Framework], design guidelines"
ms.assetid: 6b49314e-8bba-43ea-97ca-4e0255812f95
---
# Type Design Guidelines
# Type design guidelines

From the CLR perspective, there are only two categories of types—reference types and value types—but for the purpose of a discussion about framework design, we divide types into more logical groups, each with its own specific design rules.

Expand All @@ -27,7 +27,7 @@ From the CLR perspective, there are only two categories of types—reference typ

✔️ DO ensure that each type is a well-defined set of related members, not just a random collection of unrelated functionality.

## In This Section
## In this section

[Choosing Between Class and Struct](choosing-between-class-and-struct.md)\
[Abstract Class Design](abstract-class.md)\
Expand Down
36 changes: 19 additions & 17 deletions docs/standard/generics/interfaces.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
---
description: "Learn more about: Generic interfaces"
title: "Generic Interfaces"
ms.date: "03/30/2017"
description: "Learn more about interfaces for generic types in .NET."
title: Generic interfaces
titleSuffix: .NET
ms.date: 03/30/2022
helpviewer_keywords:
- "generic interfaces [.NET]"
- "equality comparisons [.NET]"
- "generics [.NET], interfaces"
- "ordering comparisons [.NET]"
ms.assetid: 88bf5b04-d371-4edb-ba38-01ec7cabaacf
---
# Generic interfaces
# Generic interfaces in .NET

This article provides an overview of generic interfaces that provide common functionality across families of generic types.
This article provides an overview of .NET's generic interfaces that provide common functionality across families of generic types.

Generic interfaces provide type-safe counterparts to nongeneric interfaces for ordering and equality comparisons and for functionality that is shared by generic collection types.
Generic interfaces provide type-safe counterparts to nongeneric interfaces for ordering and equality comparisons, and for functionality that's shared by generic collection types.

> [!NOTE]
> The type parameters of several generic interfaces are marked covariant or contravariant, providing greater flexibility in assigning and using types that implement these interfaces. See [Covariance and Contravariance](covariance-and-contravariance.md).
> The type parameters of several generic interfaces are marked covariant or contravariant, providing greater flexibility in assigning and using types that implement these interfaces. For more information, see [Covariance and Contravariance](covariance-and-contravariance.md).
## Equality and Ordering Comparisons
## Equality and ordering comparisons

In the <xref:System> namespace, the <xref:System.IComparable%601?displayProperty=nameWithType> and <xref:System.IEquatable%601?displayProperty=nameWithType> generic interfaces, like their nongeneric counterparts, define methods for ordering comparisons and equality comparisons, respectively. Types implement these interfaces to provide the ability to perform such comparisons.
- In the <xref:System> namespace, the **<xref:System.IComparable%601?displayProperty=nameWithType>** and **<xref:System.IEquatable%601?displayProperty=nameWithType>** generic interfaces, like their nongeneric counterparts, define methods for ordering comparisons and equality comparisons, respectively. Types implement these interfaces to provide the ability to perform such comparisons.

In the <xref:System.Collections.Generic> namespace, the <xref:System.Collections.Generic.IComparer%601> and <xref:System.Collections.Generic.IEqualityComparer%601> generic interfaces offer a way to define an ordering or equality comparison for types that do not implement the <xref:System.IComparable%601?displayProperty=nameWithType> or <xref:System.IEquatable%601?displayProperty=nameWithType> generic interface, and they provide a way to redefine those relationships for types that do. These interfaces are used by methods and constructors of many of the generic collection classes. For example, you can pass a generic <xref:System.Collections.Generic.IComparer%601> object to the constructor of the <xref:System.Collections.Generic.SortedDictionary%602> class to specify a sort order for a type that does not implement generic <xref:System.IComparable%601?displayProperty=nameWithType>. There are overloads of the <xref:System.Array.Sort%2A?displayProperty=nameWithType> generic static method and the <xref:System.Collections.Generic.List%601.Sort%2A?displayProperty=nameWithType> instance method for sorting arrays and lists using generic <xref:System.Collections.Generic.IComparer%601> implementations.
- In the <xref:System.Collections.Generic> namespace, the **<xref:System.Collections.Generic.IComparer%601>** and **<xref:System.Collections.Generic.IEqualityComparer%601>** generic interfaces offer a way to define an ordering or equality comparison for types that don't implement the <xref:System.IComparable%601?displayProperty=nameWithType> or <xref:System.IEquatable%601?displayProperty=nameWithType> interface. They also provide a way to redefine those relationships for types that do.

These interfaces are used by methods and constructors of many of the generic collection classes. For example, you can pass a generic <xref:System.Collections.Generic.IComparer%601> object to the constructor of the <xref:System.Collections.Generic.SortedDictionary%602> class to specify a sort order for a type that does not implement generic <xref:System.IComparable%601?displayProperty=nameWithType>. There are overloads of the <xref:System.Array.Sort%2A?displayProperty=nameWithType> generic static method and the <xref:System.Collections.Generic.List%601.Sort%2A?displayProperty=nameWithType> instance method for sorting arrays and lists using generic <xref:System.Collections.Generic.IComparer%601> implementations.

The <xref:System.Collections.Generic.Comparer%601> and <xref:System.Collections.Generic.EqualityComparer%601> generic classes provide base classes for implementations of the <xref:System.Collections.Generic.IComparer%601> and <xref:System.Collections.Generic.IEqualityComparer%601> generic interfaces, and also provide default ordering and equality comparisons through their respective <xref:System.Collections.Generic.Comparer%601.Default%2A?displayProperty=nameWithType> and <xref:System.Collections.Generic.EqualityComparer%601.Default%2A?displayProperty=nameWithType> properties.
The <xref:System.Collections.Generic.Comparer%601> and <xref:System.Collections.Generic.EqualityComparer%601> generic classes provide base classes for implementations of the <xref:System.Collections.Generic.IComparer%601> and <xref:System.Collections.Generic.IEqualityComparer%601> generic interfaces, and also provide default ordering and equality comparisons through their respective <xref:System.Collections.Generic.Comparer%601.Default%2A?displayProperty=nameWithType> and <xref:System.Collections.Generic.EqualityComparer%601.Default%2A?displayProperty=nameWithType> properties.

## Collection Functionality
## Collection functionality

The <xref:System.Collections.Generic.ICollection%601> generic interface is the basic interface for generic collection types. It provides basic functionality for adding, removing, copying, and enumerating elements. <xref:System.Collections.Generic.ICollection%601> inherits from both generic <xref:System.Collections.Generic.IEnumerable%601> and nongeneric <xref:System.Collections.IEnumerable>.
- The **<xref:System.Collections.Generic.ICollection%601>** generic interface is the basic interface for generic collection types. It provides basic functionality for adding, removing, copying, and enumerating elements. <xref:System.Collections.Generic.ICollection%601> inherits from both generic <xref:System.Collections.Generic.IEnumerable%601> and nongeneric <xref:System.Collections.IEnumerable>.

The <xref:System.Collections.Generic.IList%601> generic interface extends the <xref:System.Collections.Generic.ICollection%601> generic interface with methods for indexed retrieval.
- The **<xref:System.Collections.Generic.IList%601>** generic interface extends the <xref:System.Collections.Generic.ICollection%601> generic interface with methods for indexed retrieval.

The <xref:System.Collections.Generic.IDictionary%602> generic interface extends the <xref:System.Collections.Generic.ICollection%601> generic interface with methods for keyed retrieval. Generic dictionary types in the .NET base class library also implement the nongeneric <xref:System.Collections.IDictionary> interface.
- The **<xref:System.Collections.Generic.IDictionary%602>** generic interface extends the <xref:System.Collections.Generic.ICollection%601> generic interface with methods for keyed retrieval. Generic dictionary types in the .NET base class library also implement the nongeneric <xref:System.Collections.IDictionary> interface.

The <xref:System.Collections.Generic.IEnumerable%601> generic interface provides a generic enumerator structure. The <xref:System.Collections.Generic.IEnumerator%601> generic interface implemented by generic enumerators inherits the nongeneric <xref:System.Collections.IEnumerator> interface; the <xref:System.Collections.IEnumerator.MoveNext%2A> and <xref:System.Collections.IEnumerator.Reset%2A> members, which do not depend on the type parameter `T`, appear only on the nongeneric interface. This means that any consumer of the nongeneric interface can also consume the generic interface.
- The **<xref:System.Collections.Generic.IEnumerable%601>** generic interface provides a generic enumerator structure. The <xref:System.Collections.Generic.IEnumerator%601> generic interface implemented by generic enumerators inherits the nongeneric <xref:System.Collections.IEnumerator> interface; the <xref:System.Collections.IEnumerator.MoveNext%2A> and <xref:System.Collections.IEnumerator.Reset%2A> members, which do not depend on the type parameter `T`, appear only on the nongeneric interface. This means that any consumer of the nongeneric interface can also consume the generic interface.

## See also

Expand Down

0 comments on commit 8d65fd8

Please sign in to comment.