Changelog
- Assembly trimmer to automatically remove all unused types and members from SourceGen Utils
ArrayBuilder<T>.RemoveRange(int start, int count)to remove a range of elements from the builderArrayBuilder<T>.ReplaceAll(T toReplace, T newValue)to replace all occurrences of a value in the builderArrayBuilder<T>.Insert(int index, T value)to insert a value at a specific index in the builderArrayBuilder<T>.InsertRange(int index, ReadonlySpan<T> values)andArrayBuilder<T>.InsertRange(int index, IEnumerable<T> values)to insert a range of values at a specific index in the builderArrayBuilder<T>.CopyTo(int offset)to copy the contents of the builder to a destination array starting at a specific offset
EquatableArrayequals going recursive- Compilation errors when using
SyntaxExtensions.GetAttributeSymbol - First indent not being written in
CodeWriteruntilAppendLinehas been called SymbolExtensions.GetDeclarationStringnot supporting interfaces /CodeWriter.Append(ITypeSymbol)not supporting interfacesObjectPool<T>(and the collection pools) is now thread-safeCodeWriter.WithConditionstill writing the closing#endifwhen the condition is empty
EnableRecordSupportAttribute- assembly level attribute for injecting support for recordsEnableRequiredSupportAttribute- assembly level attribute for injecting support for required membersArrayBuilder<T>.ToImmutableArray()for converting the builder contents to an immutable arrayVariableNames.AppendGlobalPrefixfor appendingglobal::to a span or stringSyntaxExtensions.HasAttribute(string)for checking if a symbol has a specific attributeSyntaxExtensions.TryGetAttribute(string, out AttributeData)for checking if a symbol has a specific attribute and retrieving the attribute dataStringBuilderExtensions.Append(ReadOnlySpan<char>)for appending a read-only character span to a StringBuilder instanceStringBuilderExtensions.AppendLine(ReadOnlySpan<char>)for appending a read-only character span with a new-lineCodeWriter.AppendIndentedSource(string)for appending an entire block of code with the proper indentation
CodeWriter.AppendLine(ITypeSymbol, bool, bool)not generatingCodeWriter.Append(ITypeSymbol, bool, bool)
CodeWriter.WithBlock(bool newLineOnDispose = false)for automatic newline when block is disposedArrayBuilder<T>.AddRange(IEnumerable<T>)for adding genericIEnumerablecollectionsArrayBuilder<T>.ToArray()for converting the builder to an arrayArrayBuilder<T>.IndexOf(T)for finding the index of an element in the builderArrayBuilder<T>.Contains(T)for determining if an element exists in the builderArrayBuilder<T>.Countfor getting the number of elements in the builderArrayBuilder<T>indexer for getting and setting elements by index
- Lots of XML documentation fixes, both for wrong and missing documentation
ArrayBuilder<T>.ToString()not returning a proper string representation when not usingcharas generic argument- Compilation error in
ArrayBuilder<T>.Remove
Initial release