﻿using System;
using System.Runtime.InteropServices;

namespace Examples
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            RevisionManager.Application application = null;
            RevisionManager.Insight insight = null;

            try
            {
                application = new RevisionManager.Application();
                insight = (RevisionManager.Insight)application.Insight;

                var FileName = "http://solidvm/Engineering/PreReleased/PreReleasedDocLib/Summit.par";
                RevisionManager.SPServerType SPServerType = default(RevisionManager.SPServerType);

                insight.GetSharePointServerType(FileName, ref SPServerType);

                switch (SPServerType)
                {
                    case RevisionManager.SPServerType.SERVER_TYPE_NOT_SHAREPOINT:
                        break;
                    case RevisionManager.SPServerType.SHAREPOINT_V1_SERVER:
                        break;
                    case RevisionManager.SPServerType.SHAREPOINT_V2_SERVER:
                        break;
                    case RevisionManager.SPServerType.SHAREPOINT_V3_SERVER:
                        break;
                }
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
    }
}