<commit_before>// propertyset.dart

// ignore_for_file: constant_identifier_names, non_constant_identifier_names

import '../../../com/iinspectable.dart';
import '../../../winrt_constants.dart';
import '../../../winrt_helpers.dart';
import 'iiterator.dart';
import 'ikeyvaluepair.dart';
import 'imap.dart';

/// @nodoc
const IID_PropertySet = '{D0204E8D-5F1D-4F95-A6E2-BE7B29830342}';

/// Represents a property set, which is a set of `PropertyValue` objects with
/// string keys.
///
/// {@category Class}
/// {@category winrt}
class PropertySet extends IInspectable implements IMap<String, Object?> {
  PropertySet() : super(ActivateClass(_className));
  PropertySet.fromRawPointer(super.ptr);

  static const _className = 'Windows.Foundation.Collections.PropertySet';

  late final _iMap =
      IMap<String, Object?>.fromRawPointer(toInterface(IID_IMap_String_Object));

  @override
  void clear() => _iMap.clear();

  @override
  IIterator<IKeyValuePair<String, Object?>> first() => _iMap.first();

  @override
  Map<String, Object?> getView() => _iMap.getView();

  @override
  bool hasKey(String value) => _iMap.hasKey(value);

  @override
  bool insert(String key, Object? value) => _iMap.insert(key, value);

  @override
  Object? lookup(String key) => _iMap.lookup(key);<commit_msg>Add `allocator` parameter to PropertySet<commit_after>// propertyset.dart

// ignore_for_file: constant_identifier_names, non_constant_identifier_names

import 'dart:ffi';

import 'package:ffi/ffi.dart';

import '../../../com/iinspectable.dart';
import '../../../winrt_constants.dart';
import '../../../winrt_helpers.dart';
import 'iiterator.dart';
import 'ikeyvaluepair.dart';
import 'imap.dart';

/// @nodoc
const IID_PropertySet = '{D0204E8D-5F1D-4F95-A6E2-BE7B29830342}';

/// Represents a property set, which is a set of `PropertyValue` objects with
/// string keys.
///
/// {@category Class}
/// {@category winrt}
class PropertySet extends IInspectable implements IMap<String, Object?> {
  PropertySet({Allocator allocator = calloc})
      : super(ActivateClass(_className, allocator: allocator));
  PropertySet.fromRawPointer(super.ptr);

  static const _className = 'Windows.Foundation.Collections.PropertySet';

  late final _iMap =
      IMap<String, Object?>.fromRawPointer(toInterface(IID_IMap_String_Object));

  @override
  void clear() => _iMap.clear();

  @override
  IIterator<IKeyValuePair<String, Object?>> first() => _iMap.first();

  @override
  Map<String, Object?> getView() => _iMap.getView();

  @override
  bool hasKey(String value) => _iMap.hasKey(value);

  @override
  bool insert(String key, Object? value) => _iMap.insert(key, value);

  @override
  Object? lookup(String key) => _iMap.lookup(key);
{'fraction_non_alphanumeric': 0.15692760014700477, 'fraction_numerical': 0.015435501653803748, 'mean_word_length': 4.600823045267489, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4038925', 'n_tokens_mistral': 932, 'n_tokens_neox': 909, 'n_words': 191}