Beispiel #1
0
            public static void InitializeService(Microsoft.Synchronization.Services.ISyncServiceConfiguration config)
            {
                // TODO: MUST set these values
                config.ServerConnectionString = "test";

                config.SetEnableScope("TestScope");

                //config.AddFilterParameterConfiguration("Owner_Id", "[FTasks]", "@Owner_Id", typeof(System.String));
            }
        public static void InitializeService(Microsoft.Synchronization.Services.ISyncServiceConfiguration config)
        {
            // TODO: MUST set these values
            config.ServerConnectionString = ConfigurationManager.ConnectionStrings["ListDbConnectionString"].ToString();

            config.SetEnableScope("DefaultScope");
            config.AddFilterParameterConfiguration("userid", "User", "@ID", typeof(System.Guid));
            config.AddFilterParameterConfiguration("userid", "Item", "@UserID", typeof(System.Guid));
            config.AddFilterParameterConfiguration("userid", "List", "@UserID", typeof(System.Guid));
            config.AddFilterParameterConfiguration("userid", "TagItemMapping", "@UserID", typeof(System.Guid));
            //
            //
            // TODO: Optional.
            // config.UseVerboseErrors = true;
            // config.EnableDiagnosticPage = true;
            // config.SetDefaultSyncSerializationFormat(Microsoft.Synchronization.Services.SyncSerializationFormat.ODataJson);
            // config.SetConflictResolutionPolicy(Microsoft.Synchronization.Services.ConflictResolutionPolicy.ServerWins);
        }