public static DirSyncStatusValue ConvertStringToDirSyncStatus(string stringValue)
        {
            if (string.IsNullOrEmpty(stringValue))
            {
                ExTraceGlobals.ActiveDirectoryTracer.TraceError(0L, "<SyncValueConvertor::ConvertStringToDirSyncStatus> NULL or empty string passed in");
                return(null);
            }
            ExTraceGlobals.ActiveDirectoryTracer.TraceDebug <string>(0L, "<SyncValueConvertor::ConvertStringToDirSyncStatus> stringValue = \"{0}\"", stringValue);
            string[] array = stringValue.Split(new char[]
            {
                ','
            }, StringSplitOptions.RemoveEmptyEntries);
            if (array.Length != 4)
            {
                ExTraceGlobals.ActiveDirectoryTracer.TraceError <string>(0L, "<SyncValueConvertor::ConvertStringToDirSyncStatus> Failed to parse \"{0}\"", stringValue);
                return(null);
            }
            DirSyncStatusValue dirSyncStatusValue = new DirSyncStatusValue();

            dirSyncStatusValue.State = (DirSyncState)Enum.Parse(typeof(DirSyncState), array[0]);
            ExTraceGlobals.ActiveDirectoryTracer.TraceDebug <string>(0L, "<SyncValueConvertor::ConvertStringToDirSyncStatus> dirSyncStatusValue.State = {0}", dirSyncStatusValue.State.ToString());
            dirSyncStatusValue.AttributeSetName = array[1];
            ExTraceGlobals.ActiveDirectoryTracer.TraceDebug <string>(0L, "<SyncValueConvertor::ConvertStringToDirSyncStatus> dirSyncStatusValue.AttributeSetName = \"{0}\"", dirSyncStatusValue.AttributeSetName);
            dirSyncStatusValue.Version = array[2];
            ExTraceGlobals.ActiveDirectoryTracer.TraceDebug <string>(0L, "<SyncValueConvertor::ConvertStringToDirSyncStatus> dirSyncStatusValue.Version = \"{0}\"", dirSyncStatusValue.Version);
            return(dirSyncStatusValue);
        }
        public static string ConvertDirSyncStatusToString(DirSyncStatusValue dirSyncStatusValue)
        {
            if (dirSyncStatusValue == null)
            {
                ExTraceGlobals.ActiveDirectoryTracer.TraceError(0L, "<SyncValueConvertor::ConvertDirSyncStatusToString> NULL DirSyncStatusValue passed in");
                return(string.Empty);
            }
            string text = string.Format("{0},{1},{2},{3}", new object[]
            {
                dirSyncStatusValue.State.ToString(),
                dirSyncStatusValue.AttributeSetName,
                dirSyncStatusValue.Version,
                0
            });

            ExTraceGlobals.ActiveDirectoryTracer.TraceDebug <string>(0L, "<SyncValueConvertor::ConvertDirSyncStatusToString> return \"{0}\"", text);
            return(text);
        }