+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace {Namespace.GetPublicName(record.Namespace)};
// AUTOGENERATED FILE - DO NOT MODIFY

{PlatformSupportAttribute.Render(record as GirModel.PlatformDependent)}
public partial class {name} : GLib.BoxedRecord
public sealed partial class {name} : GLib.BoxedRecord
{{
public {internalHandleName} Handle {{ get; }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace {Namespace.GetPublicName(record.Namespace)};
// AUTOGENERATED FILE - DO NOT MODIFY

{PlatformSupportAttribute.Render(record as GirModel.PlatformDependent)}
public partial class {name}
public sealed partial class {name}
{{
public {internalHandleName} Handle {{ get; }}

Expand Down
2 changes: 1 addition & 1 deletion src/Generation/Generator/Renderer/Public/TypedRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace {Namespace.GetPublicName(record.Namespace)};
// AUTOGENERATED FILE - DO NOT MODIFY

{PlatformSupportAttribute.Render(record as GirModel.PlatformDependent)}
public partial class {name} : GLib.BoxedRecord
public sealed partial class {name} : GLib.BoxedRecord
{{
public {internalHandleName} Handle {{ get; }}

Expand Down
2 changes: 1 addition & 1 deletion src/Generation/Generator/Renderer/Public/UntypedRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace {Namespace.GetPublicName(record.Namespace)};
// AUTOGENERATED FILE - DO NOT MODIFY

{PlatformSupportAttribute.Render(record as GirModel.PlatformDependent)}
public partial class {name}
public sealed partial class {name}
{{
public {internalHandleName} Handle {{ get; }}

Expand Down
6 changes: 6 additions & 0 deletions src/Tests/Libs/GirTest-0.1.Tests/OpaqueTypedRecordTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,10 @@ public void SupportsWrapHandle()
recordTester.GetRefCount().Should().Be(2);
wrapped.GetRefCount().Should().Be(2);
}

[TestMethod]
public void IsSealed()
{
typeof(OpaqueTypedRecordTester).IsSealed.Should().BeTrue();
}
}
6 changes: 6 additions & 0 deletions src/Tests/Libs/GirTest-0.1.Tests/OpaqueUntypedRecordTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,10 @@ public void SupportsWrapHandle()
//TODO: Depends on https://github.com/gircore/gir.core/issues/946
Assert.Inconclusive();
}

[TestMethod]
public void IsSealed()
{
typeof(OpaqueUntypedRecordTester).IsSealed.Should().BeTrue();
}
}
6 changes: 6 additions & 0 deletions src/Tests/Libs/GirTest-0.1.Tests/TypedRecordTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -374,4 +374,10 @@ public void HasParameterlessConstructor()
var instance = new TypedRecordTester();
instance.Should().NotBeNull();
}

[TestMethod]
public void IsSealed()
{
typeof(TypedRecordTester).IsSealed.Should().BeTrue();
}
}
6 changes: 6 additions & 0 deletions src/Tests/Libs/GirTest-0.1.Tests/UntypedRecordTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,10 @@ public void SupportsRecordPointerArrayAsParameter()
var result = UntypedRecordTester.GetAFromLastElementPointer(array);
result.Should().Be(6);
}

[TestMethod]
public void IsSealed()
{
typeof(UntypedRecordTester).IsSealed.Should().BeTrue();
}
}
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载