internal class PropTypes

    {

        private static int _propPubYear;

        private static int _propIsbn;

        private static int _propBookAuthor;

 

        internal static int BookAuthor

        {

            get { return _propBookAuthor; }

        }

 

        internal static int PubYear

        {

            get { return _propPubYear; }

        }

 

        internal static int Isbn

        {

            get { return _propIsbn; }

        }

 

        internal static void Register()

        {

            _propPubYear = Core.ResourceStore.PropTypes.Register( "JetBrains.Librarian.PubYear",

                PropDataType.Int );

            Core.ResourceStore.PropTypes.RegisterDisplayName( PropTypes.PubYear, "Pub.Year" );

 

            _propIsbn = Core.ResourceStore.PropTypes.Register( "JetBrains.Librarian.ISBN",

                PropDataType.String );

            Core.ResourceStore.PropTypes.RegisterDisplayName( _propIsbn, "ISBN" );

 

            _propBookAuthor = Core.ResourceStore.PropTypes.Register( "JetBrains.Librarian.BookAuthor",

                PropDataType.Link );

            Core.ResourceStore.PropTypes.RegisterDisplayName( _propBookAuthor, "Author" );

 

            Core.ResourceStore.RegisterLinkRestriction( ResourceTypes.Book, _propBookAuthor,

                "Contact", 0, Int32.MaxValue );

            Core.ResourceStore.RegisterUniqueRestriction( ResourceTypes.Book, _propIsbn );

        }

    }