What is the correct way to use TypeForwardedToAttribute?

后端 未结 2 461
难免孤独
难免孤独 2021-01-01 17:07

I came across to this attribute in this post and this one. It seems that it\'s very useful when we need to upgrade an old system. Then I create a test solution(with 3 projec

2条回答
  •  礼貌的吻别
    2021-01-01 17:33

    This is the first time I've heard about that attribute, interesting :)

    The way I read the documentation, the attribute can be used in scenario's where you're only delivering a set of library dll's.

    Let's say you have some application, that uses a set of widgets from a DLL. Later on, you decide to move parts of that DLL to a separate DLL. Using the TypeForwardedToAttribute, you can do that by having the old DLL reference the new one. You can now deploy both DLL's to the installations of the existing application, without recompiling the application itself

    This could be useful in scenario's where you don't have control over the application itself, but are merely supplying a set of library dll's. In order for your codebase to move forward, you can use the TypeForwardedToAttribute, and have users deploy it safely to their application, without breaking anything.

提交回复
热议问题