Skip to content

Commit 41992a3

Browse files
authored
Merge pull request #1203 from gircore/disposable-interfaces
Interfaces should implement IDisposable
2 parents b463f61 + 5a92b02 commit 41992a3

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/Generation/Generator/Renderer/Public/Interface/InterfaceMethods.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace {Namespace.GetPublicName(iface.Namespace)};
2020
2121
// AUTOGENERATED FILE - DO NOT MODIFY
2222
23-
public partial interface {iface.Name}
23+
public partial interface {iface.Name} : IDisposable
2424
{{
2525
{iface.Methods
2626
.Where(Method.IsEnabled)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
using FluentAssertions;
3+
using Microsoft.VisualStudio.TestTools.UnitTesting;
4+
5+
namespace GObject.Tests.Classes;
6+
7+
[TestClass, TestCategory("UnitTest")]
8+
public class InterfaceTests : Test
9+
{
10+
[TestMethod]
11+
public void InterfaceShouldImplementIDisposable()
12+
{
13+
typeof(TypePlugin).Should().Implement<IDisposable>();
14+
}
15+
}

0 commit comments

Comments
 (0)