Skip to content

Commit

Permalink
Make Protocol::GetOrCreateExtension and Protocol::GetExtension virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
Iliya-usov committed Dec 4, 2023
1 parent 80509e7 commit 6cdf84d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rd-net/RdFramework/Impl/Protocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ internal void SubmitExtCreated(ExtCreationInfo info)
public RName Location { get; }
IProtocol IRdDynamic.TryGetProto() => this;

public T? GetExtension<T>() where T : RdExtBase
public virtual T? GetExtension<T>() where T : RdExtBase
{
var parentProtocol = myParentProtocol;
if (parentProtocol != null)
Expand All @@ -149,7 +149,7 @@ internal void SubmitExtCreated(ExtCreationInfo info)
}
}

public T GetOrCreateExtension<T>(Func<T> create) where T : RdExtBase
public virtual T GetOrCreateExtension<T>(Func<T> create) where T : RdExtBase
{
if (create == null) throw new ArgumentNullException(nameof(create));

Expand Down

0 comments on commit 6cdf84d

Please sign in to comment.