Version classification

I am looking for a clean way to do incremental updates in my code library without breaking compatibility. This may mean adding new members to classes or modifying existing members to provide additional functionality. Sometimes I need to change a member so that it breaks existing code (for example, renames a method or changes its return type), so I would not touch any of my existing types after sending them.

The way I'm currently setting this up is through inheritance and polymorphism, creating a new class that extends the previous “version” of this class.

class diagram

, StatusResult (, StatusResultVersion3) ProtocolVersion CommandResult.

.NET, , , : . , , . , . . , .

?

+5
4

:

  • , .. Visual Studio , .

  • , , - , ..NET . , , .

+1

, . :

... . , , . .

, , . , , , () , .

, (, , intellisense )

, .

...

v 0.1.0.0

interface IExample
{
    String DoSomething();
}

v 0.2.0.0

interface IExample
{
    void DoSomethingElse();
}

, , , , , ( ?)

0.1.x.x, 0.2.x.x. - () , . VCS ( TFS, SVN - , /).

0.2 0.1, , () 0.1.1.0.

:

  • Major Minor , - ( Build/Revision)
  • , Major/Minor ( , )
  • Major/Minor, /

:

  • ,
  • , , , (, , , .)
+1

OP , :

, , . , , . - .

0

, .Net, DataContractSerializers DataAnnotations. , , , .

0

All Articles