Example #1
0
        public void ProcessJob(TaskScheduling task)
        {
            ServicesAdministrationServiceClient adminClient = new ServicesAdministrationServiceClient(true);
            List <StoreType> storeTypes = adminClient.LoadAllStoreTypes();

            adminClient.LoadAllIdentityStores().ForEach((IdentityStore store) => {
                if (store.get_StoreType() == null)
                {
                    StoreType storeType = storeTypes.Find((StoreType st) => st.get_StoreTypeId() == store.get_StoreTypeId());
                    if (storeType != null)
                    {
                        store.set_StoreType(storeType);
                    }
                }
                this.ReplicateStore(store);
            });
            try
            {
                ActionResult result = (new ServicesAdministrationServiceClient(true)).EnsureSchemaLinkAttributeIsUptoDate();
                Helper.LogDebugResults(SchemaReplicationProcessor.logger, result, "Schema link attribute update ");
            }
            catch (Exception exception1)
            {
                Exception exception = exception1;
                string    message   = string.Concat("Error occurred while updating the schema link attribute. Reason: ", exception.Message);
                LogExtension.LogException(SchemaReplicationProcessor.logger, message, exception);
            }
            SchemaReplicationProcessor.logger.InfoFormat("Job processed successfully.", Array.Empty <object>());
        }