internal static bool IsOpenForEdit(string assetPath, out string message) { message = string.Empty; if (string.IsNullOrEmpty(assetPath)) { return(true); } bool result = AssetModificationHook.IsOpenForEdit(assetPath, out message); MethodInfo[] array = AssetModificationProcessorInternal.GetIsOpenForEditMethods(); for (int i = 0; i < array.Length; i++) { MethodInfo methodInfo = array[i]; object[] array2 = new object[] { assetPath, message }; if (!(bool)methodInfo.Invoke(null, array2)) { message = (array2[1] as string); return(false); } } return(result); }
internal static bool IsOpenForEdit(string assetPath, out string message, StatusQueryOptions statusOptions) { message = ""; bool result; if (string.IsNullOrEmpty(assetPath)) { result = true; } else { bool flag = AssetModificationHook.IsOpenForEdit(assetPath, out message, statusOptions); MethodInfo[] array = AssetModificationProcessorInternal.GetIsOpenForEditMethods(); for (int i = 0; i < array.Length; i++) { MethodInfo methodInfo = array[i]; object[] array2 = new object[] { assetPath, message }; if (!(bool)methodInfo.Invoke(null, array2)) { message = (array2[1] as string); result = false; return(result); } } result = flag; } return(result); }
internal static bool IsOpenForEdit(string assetPath, out string message) { message = string.Empty; if (string.IsNullOrEmpty(assetPath)) { return(true); } bool flag = AssetModificationHook.IsOpenForEdit(assetPath, out message); foreach (MethodInfo openForEditMethod in AssetModificationProcessorInternal.GetIsOpenForEditMethods()) { object[] parameters = new object[2] { (object)assetPath, (object)message }; if (!(bool)openForEditMethod.Invoke((object)null, parameters)) { message = parameters[1] as string; return(false); } } return(flag); }