Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
refactor!: Rename named parameters of WinRT generic interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
halildurmus committed Oct 31, 2023
1 parent e637360 commit d19a388
Show file tree
Hide file tree
Showing 208 changed files with 1,673 additions and 1,480 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class ILearningModel extends IInspectable {

return IVectorView<ILearningModelFeatureDescriptor?>.fromPtr(value,
iterableIid: '{0fa50877-6792-56b7-af46-430a8901894a}',
creator: ILearningModelFeatureDescriptor.fromPtr)
tObjectCreator: ILearningModelFeatureDescriptor.fromPtr)
.toList();
}

Expand All @@ -174,7 +174,7 @@ class ILearningModel extends IInspectable {

return IVectorView<ILearningModelFeatureDescriptor?>.fromPtr(value,
iterableIid: '{0fa50877-6792-56b7-af46-430a8901894a}',
creator: ILearningModelFeatureDescriptor.fromPtr)
tObjectCreator: ILearningModelFeatureDescriptor.fromPtr)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class ILearningModelSession extends IInspectable {

final asyncOperation =
IAsyncOperation<LearningModelEvaluationResult?>.fromPtr(operation,
creator: LearningModelEvaluationResult.fromPtr);
tResultObjectCreator: LearningModelEvaluationResult.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -129,7 +129,7 @@ class ILearningModelSession extends IInspectable {

final asyncOperation =
IAsyncOperation<LearningModelEvaluationResult?>.fromPtr(operation,
creator: LearningModelEvaluationResult.fromPtr);
tResultObjectCreator: LearningModelEvaluationResult.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ILearningModelStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<LearningModel?>.fromPtr(operation,
creator: LearningModel.fromPtr);
tResultObjectCreator: LearningModel.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -65,7 +65,7 @@ class ILearningModelStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<LearningModel?>.fromPtr(operation,
creator: LearningModel.fromPtr);
tResultObjectCreator: LearningModel.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand Down Expand Up @@ -128,7 +128,7 @@ class ILearningModelStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<LearningModel?>.fromPtr(operation,
creator: LearningModel.fromPtr);
tResultObjectCreator: LearningModel.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -151,7 +151,7 @@ class ILearningModelStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<LearningModel?>.fromPtr(operation,
creator: LearningModel.fromPtr);
tResultObjectCreator: LearningModel.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/windows_ai/lib/src/machinelearning/itensor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ITensor extends IInspectable implements ILearningModelFeatureValue {

return IVectorView<int>.fromPtr(value,
iterableIid: '{7784427e-f9cc-518d-964b-e50d5ce727f1}',
intType: IntType.int64)
tIntType: IntType.int64)
.toList();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ITensorDouble extends IInspectable {

return IVectorView<double>.fromPtr(result,
iterableIid: '{c738964e-9c64-5bce-b5ce-61e9a282ec4a}',
doubleType: DoubleType.double)
tDoubleType: DoubleType.double)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ITensorFeatureDescriptor extends IInspectable {

return IVectorView<int>.fromPtr(value,
iterableIid: '{7784427e-f9cc-518d-964b-e50d5ce727f1}',
intType: IntType.int64)
tIntType: IntType.int64)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ITensorFloat extends IInspectable {

return IVectorView<double>.fromPtr(result,
iterableIid: '{b01bee51-063a-5fda-bd72-d76637bb8cb8}',
doubleType: DoubleType.float)
tDoubleType: DoubleType.float)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ITensorFloat16Bit extends IInspectable {

return IVectorView<double>.fromPtr(result,
iterableIid: '{b01bee51-063a-5fda-bd72-d76637bb8cb8}',
doubleType: DoubleType.float)
tDoubleType: DoubleType.float)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ITensorInt16Bit extends IInspectable {

return IVectorView<int>.fromPtr(result,
iterableIid: '{72ff2923-4b4e-53bb-8feb-41ec5f2bb734}',
intType: IntType.int16)
tIntType: IntType.int16)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ITensorInt32Bit extends IInspectable {

return IVectorView<int>.fromPtr(result,
iterableIid: '{81a643fb-f51c-5565-83c4-f96425777b66}',
intType: IntType.int32)
tIntType: IntType.int32)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ITensorInt64Bit extends IInspectable {

return IVectorView<int>.fromPtr(result,
iterableIid: '{7784427e-f9cc-518d-964b-e50d5ce727f1}',
intType: IntType.int64)
tIntType: IntType.int64)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ITensorInt8Bit extends IInspectable {

return IVectorView<int>.fromPtr(result,
iterableIid: '{88318266-f3fd-50fc-8f08-b823a41b60c1}',
intType: IntType.uint8)
tIntType: IntType.uint8)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ITensorUInt16Bit extends IInspectable {

return IVectorView<int>.fromPtr(result,
iterableIid: '{ecfa9a6f-fa2e-5345-b297-efb4e8c6be87}',
intType: IntType.uint16)
tIntType: IntType.uint16)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ITensorUInt32Bit extends IInspectable {

return IVectorView<int>.fromPtr(result,
iterableIid: '{421d4b91-b13b-5f37-ae54-b5249bd80539}',
intType: IntType.uint32)
tIntType: IntType.uint32)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ITensorUInt64Bit extends IInspectable {

return IVectorView<int>.fromPtr(result,
iterableIid: '{4b3a3229-7995-5f3c-b248-6c1f7e664f01}',
intType: IntType.uint64)
tIntType: IntType.uint64)
.toList();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ITensorUInt8Bit extends IInspectable {

return IVectorView<int>.fromPtr(result,
iterableIid: '{88318266-f3fd-50fc-8f08-b823a41b60c1}',
intType: IntType.uint8)
tIntType: IntType.uint8)
.toList();
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/windows_ai/test/collections_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void main() {

return IVectorView.fromPtr(retValuePtr,
iterableIid: '{b01bee51-063a-5fda-bd72-d76637bb8cb8}',
doubleType: DoubleType.float);
tDoubleType: DoubleType.float);
}

IVectorView<double> getVectorView() {
Expand Down
2 changes: 1 addition & 1 deletion packages/windows_applicationmodel/lib/src/ipackage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class IPackage extends IInspectable {

return IVectorView<Package?>.fromPtr(value,
iterableIid: '{69ad6aa7-0c49-5f27-a5eb-ef4d59467b6d}',
creator: Package.fromPtr)
tObjectCreator: Package.fromPtr)
.toList();
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/windows_applicationmodel/lib/src/ipackage3.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ class IPackage3 extends IInspectable {

final asyncOperation = IAsyncOperation<IVectorView<AppListEntry?>>.fromPtr(
operation,
creator: (ptr) => IVectorView.fromPtr(ptr,
creator: AppListEntry.fromPtr,
iterableIid: '{86f4d4ef-d8fd-5fb5-807c-72da8fc9e544}'));
tResultObjectCreator: (ptr) => IVectorView.fromPtr(ptr,
iterableIid: '{86f4d4ef-d8fd-5fb5-807c-72da8fc9e544}',
tObjectCreator: AppListEntry.fromPtr));
return asyncOperation.toFuture(() => asyncOperation.getResults().toList());
}
}
Expand Down
20 changes: 10 additions & 10 deletions packages/windows_applicationmodel/lib/src/ipackage5.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class IPackage5 extends IInspectable {

final asyncOperation =
IAsyncOperation<IVector<PackageContentGroup?>>.fromPtr(operation,
creator: (ptr) => IVector.fromPtr(ptr,
creator: PackageContentGroup.fromPtr,
iterableIid: '{d7dd1456-4805-5768-a25d-99641b096491}'));
tResultObjectCreator: (ptr) => IVector.fromPtr(ptr,
iterableIid: '{d7dd1456-4805-5768-a25d-99641b096491}',
tObjectCreator: PackageContentGroup.fromPtr));
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -65,7 +65,7 @@ class IPackage5 extends IInspectable {

final asyncOperation = IAsyncOperation<PackageContentGroup?>.fromPtr(
operation,
creator: PackageContentGroup.fromPtr);
tResultObjectCreator: PackageContentGroup.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -84,9 +84,9 @@ class IPackage5 extends IInspectable {

final asyncOperation =
IAsyncOperation<IVector<PackageContentGroup?>>.fromPtr(operation,
creator: (ptr) => IVector.fromPtr(ptr,
creator: PackageContentGroup.fromPtr,
iterableIid: '{d7dd1456-4805-5768-a25d-99641b096491}'));
tResultObjectCreator: (ptr) => IVector.fromPtr(ptr,
iterableIid: '{d7dd1456-4805-5768-a25d-99641b096491}',
tObjectCreator: PackageContentGroup.fromPtr));
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -106,9 +106,9 @@ class IPackage5 extends IInspectable {

final asyncOperation =
IAsyncOperation<IVector<PackageContentGroup?>>.fromPtr(operation,
creator: (ptr) => IVector.fromPtr(ptr,
creator: PackageContentGroup.fromPtr,
iterableIid: '{d7dd1456-4805-5768-a25d-99641b096491}'));
tResultObjectCreator: (ptr) => IVector.fromPtr(ptr,
iterableIid: '{d7dd1456-4805-5768-a25d-99641b096491}',
tObjectCreator: PackageContentGroup.fromPtr));
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/windows_applicationmodel/lib/src/ipackage6.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class IPackage6 extends IInspectable {

final asyncOperation =
IAsyncOperation<PackageUpdateAvailabilityResult?>.fromPtr(operation,
creator: PackageUpdateAvailabilityResult.fromPtr);
tResultObjectCreator: PackageUpdateAvailabilityResult.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/windows_applicationmodel/lib/src/ipackage8.dart
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class IPackage8 extends IInspectable {

return IVectorView<AppListEntry?>.fromPtr(result,
iterableIid: '{86f4d4ef-d8fd-5fb5-807c-72da8fc9e544}',
creator: AppListEntry.fromPtr)
tObjectCreator: AppListEntry.fromPtr)
.toList();
}

Expand Down
2 changes: 1 addition & 1 deletion packages/windows_applicationmodel/lib/src/ipackage9.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class IPackage9 extends IInspectable {

return IVector.fromPtr(result,
iterableIid: '{69ad6aa7-0c49-5f27-a5eb-ef4d59467b6d}',
creator: Package.fromPtr);
tObjectCreator: Package.fromPtr);
}

String get sourceUriSchemeName {
Expand Down
4 changes: 2 additions & 2 deletions packages/windows_data/lib/src/json/jsonarray.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ class JsonArray extends IInspectable

late final _iVector = IVector<IJsonValue?>.fromPtr(
toInterface('{d44662bc-dce3-59a8-9272-4b210f33908b}'),
creator: IJsonValue.fromPtr,
iterableIid: '{cb0492b6-4113-55cf-b2c5-99eb428ba493}');
iterableIid: '{cb0492b6-4113-55cf-b2c5-99eb428ba493}',
tObjectCreator: IJsonValue.fromPtr);

@override
IJsonValue? getAt(int index) => _iVector.getAt(index);
Expand Down
4 changes: 2 additions & 2 deletions packages/windows_data/lib/src/json/jsonobject.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ class JsonObject extends IInspectable

late final _iMap = IMap<String, IJsonValue?>.fromPtr(
toInterface('{c9d9a725-786b-5113-b4b7-9b61764c220b}'),
creator: IJsonValue.fromPtr,
iterableIid: '{dfabb6e1-0411-5a8f-aa87-354e7110f099}');
iterableIid: '{dfabb6e1-0411-5a8f-aa87-354e7110f099}',
vObjectCreator: IJsonValue.fromPtr);

@override
IJsonValue? lookup(String key) => _iMap.lookup(key);
Expand Down
8 changes: 4 additions & 4 deletions packages/windows_data/lib/src/pdf/ipdfdocumentstatics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class IPdfDocumentStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<PdfDocument?>.fromPtr(asyncInfo,
creator: PdfDocument.fromPtr);
tResultObjectCreator: PdfDocument.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -63,7 +63,7 @@ class IPdfDocumentStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<PdfDocument?>.fromPtr(asyncInfo,
creator: PdfDocument.fromPtr);
tResultObjectCreator: PdfDocument.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -81,7 +81,7 @@ class IPdfDocumentStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<PdfDocument?>.fromPtr(asyncInfo,
creator: PdfDocument.fromPtr);
tResultObjectCreator: PdfDocument.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -100,7 +100,7 @@ class IPdfDocumentStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<PdfDocument?>.fromPtr(asyncInfo,
creator: PdfDocument.fromPtr);
tResultObjectCreator: PdfDocument.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class IXmlDocumentStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<XmlDocument?>.fromPtr(asyncInfo,
creator: XmlDocument.fromPtr);
tResultObjectCreator: XmlDocument.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -68,7 +68,7 @@ class IXmlDocumentStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<XmlDocument?>.fromPtr(asyncInfo,
creator: XmlDocument.fromPtr);
tResultObjectCreator: XmlDocument.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -85,7 +85,7 @@ class IXmlDocumentStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<XmlDocument?>.fromPtr(asyncInfo,
creator: XmlDocument.fromPtr);
tResultObjectCreator: XmlDocument.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}

Expand All @@ -104,7 +104,7 @@ class IXmlDocumentStatics extends IInspectable {
}

final asyncOperation = IAsyncOperation<XmlDocument?>.fromPtr(asyncInfo,
creator: XmlDocument.fromPtr);
tResultObjectCreator: XmlDocument.fromPtr);
return asyncOperation.toFuture(asyncOperation.getResults);
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/windows_data/lib/src/xml/dom/ixmlnamednodemap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ class IXmlNamedNodeMap extends IInspectable

late final _iVectorView = IVectorView<IXmlNode?>.fromPtr(
toInterface('{139d959e-e7b5-5cb6-a596-4b544478da9b}'),
creator: IXmlNode.fromPtr,
iterableIid: '{f1146ffc-8c92-56e8-93f1-711f86722633}');
iterableIid: '{f1146ffc-8c92-56e8-93f1-711f86722633}',
tObjectCreator: IXmlNode.fromPtr);

@override
IXmlNode? getAt(int index) => _iVectorView.getAt(index);
Expand Down
Loading

0 comments on commit d19a388

Please sign in to comment.