[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eExtensionRegistry\u003c/code\u003e class in the \u003ccode\u003eGoogle.Protobuf\u003c/code\u003e namespace provides a mechanism for managing extensions to messages during parsing, and it is currently marked as experimental.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eExtensionRegistry\u003c/code\u003e is 3.27.1, with previous versions including 3.23.0 and 3.15.8 also available.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements several interfaces, including \u003ccode\u003eICollection<Extension>\u003c/code\u003e, \u003ccode\u003eIEnumerable<Extension>\u003c/code\u003e, \u003ccode\u003eIEnumerable\u003c/code\u003e, and \u003ccode\u003eIDeepCloneable<ExtensionRegistry>\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can add, remove, clear, clone, and check for the presence of \u003ccode\u003eExtension\u003c/code\u003e objects within an \u003ccode\u003eExtensionRegistry\u003c/code\u003e, in addition to getting the count of the total amount of extensions present.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains functions to get an \u003ccode\u003eEnumerator\u003c/code\u003e for the extensions present in the registry, and to get and set the amount of \u003ccode\u003eExtensions\u003c/code\u003e present.\u003c/p\u003e\n"]]],[],null,["# Class ExtensionRegistry (3.27.1)\n\nVersion latestkeyboard_arrow_down\n\n- [3.27.1 (latest)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ExtensionRegistry)\n- [3.23.0](/dotnet/docs/reference/Google.Protobuf/3.23.0/Google.Protobuf.ExtensionRegistry)\n- [3.15.8](/dotnet/docs/reference/Google.Protobuf/3.15.8/Google.Protobuf.ExtensionRegistry) \n\n public sealed class ExtensionRegistry : ICollection\u003cExtension\u003e, IEnumerable\u003cExtension\u003e, IEnumerable, IDeepCloneable\u003cExtensionRegistry\u003e\n\nProvides extensions to messages while parsing. This API is experimental and subject to change. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ExtensionRegistry \n\nImplements\n----------\n\n[ICollection](https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1)[Extension](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Extension), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)[Extension](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Extension), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable), [IDeepCloneable](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1)[ExtensionRegistry](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.ExtensionRegistry) \n\nInherited Members\n-----------------\n\n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) \n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Protobuf](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf)\n\nAssembly\n--------\n\nGoogle.Protobuf.dll\n\nConstructors\n------------\n\n### ExtensionRegistry()\n\n public ExtensionRegistry()\n\nCreates a new empty extension registry\n\nProperties\n----------\n\n### Count\n\n public int Count { get; }\n\nGets the total number of extensions in this extension registry\n\nMethods\n-------\n\n### Add(Extension)\n\n public void Add(Extension extension)\n\nAdds the specified extension to the registry\n\n### AddRange(IEnumerable\\\u003cExtension\\\u003e)\n\n public void AddRange(IEnumerable\u003cExtension\u003e extensions)\n\nAdds the specified extensions to the registry\n\n### Clear()\n\n public void Clear()\n\nClears the registry of all values\n\n### Clone()\n\n public ExtensionRegistry Clone()\n\nClones the registry into a new registry\n\n### Contains(Extension)\n\n public bool Contains(Extension item)\n\nGets whether the extension registry contains the specified extension\n\n### GetEnumerator()\n\n public IEnumerator\u003cExtension\u003e GetEnumerator()\n\nReturns an enumerator to enumerate through the items in the registry\n\n### Remove(Extension)\n\n public bool Remove(Extension item)\n\nRemoves the specified extension from the set"]]