public void CheckCapabilities(SaDataModel data) { if (Entries == null || Entries.Count == 0) { return; } foreach (SaEntry entries in Entries) { bool flag = false; foreach (SaEntry dEntries in data.Entries) { if (entries.IsServer == dEntries.IsServer) { if (HasWildCard(dEntries.Name)) { if (entries.Name.IndexOf(dEntries.Name.Substring(0, dEntries.Name.Length - 1), StringComparison.Ordinal) == 0) { flag = true; break; } } else if (dEntries.Name == entries.Name) { flag = true; break; } } } if (!flag) { throw new ArgumentException($"{entries.Name} is not allowed, based on SrvAccessControlDescriptor."); } } }
public SaDescriptorModel(SaDataModel data) { Entries = data.Entries; }