Question: What do I do with ConfigureChannelFactory() and CreateChannelWithIssuedToken() in netstandard20?
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 576
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 2
Description
I am trying to migrate a project from .NET Framework 4.8 to .NET Standard 2.0 right now.
With the newest nuget packages "4.10.0-preview1.22261.2" I'm getting very close of getting rid of all the errors right now. The WSChannelFactory etc are mostly included in the latest preview, but there are two errors left in my code in the following method:
```cs
public T GetChannel()
{
using (m_log.CreateScope(nameof(GetChannel)))
{
ChannelFactory channelFactory = CreateChannelFactoryFromConfiguration();
channelFactory.ConfigureChannelFactory(); // <---------------------------this
if (m_securityToken != null)
{
m_log.WriteInfo("Creating channel with issued token");
return channelFactory.CreateChannelWithIssuedToken(m_securityToken); // <---------------------------and this
}
m_log.WriteInfo("Creating channel");
T channel = channelFactory.CreateChannel();
ClientChannelExtension clientChannelExtension = new()
{ServiceEndpoint = channelFactory.Endpoint};
((IClientChannel)channel).Extensions.Add(clientChannelExtension);
return channel;
}
}
```
Apparently both `ConfigureChannelFactory` and `CreateChannelWithIssuedToken` are part of the `Microsoft.IdentityModel`, which is a .NET Framework nuget package.
Are there alternatives that I can do?
Contributor guide
Assessment
This issue has not been assessed yet.