/// <summary> /// Registra um log. /// </summary> /// <param name="message"></param> /// <param name="category"></param> private void LogInternal(IMessageFormattable message, Colosoft.Logging.Category category) { try { _logger.Write(message, category, Colosoft.Logging.Priority.None); } catch (ArgumentException) { } catch (System.ComponentModel.Win32Exception) { } catch (InvalidOperationException) { } }
/// <summary> /// Carrega os metadados da propriedade nesse tipo /// </summary> /// <param name="property">Propriedade a ser carregada</param> /// <param name="logger"></param> internal void AddPropertyMetadata(PropertyMetadata property, Colosoft.Logging.ILogger logger) { if (property.TypeCode != this.TypeCode) { throw new Exception(ResourceMessageFormatter.Create(() => global::Colosoft.Data.Schema.Server.Properties.Resources.PropertyAndTypeNotMatched, property.Name, this.Name).Format()); } try { _propertiesDictionaryKeyFullname.Add(property.Name, property); } catch (ArgumentException ex) { logger.Write(ResourceMessageFormatter.Create(() => global::Colosoft.Data.Schema.Server.Properties.Resources.PropertyAlreadyExistsTypeMetadata, property.Name, this.Namespace + this.Name), ex, Logging.Priority.High); } _propertiesDictionaryKeyPropertyCode.Add(property.PropertyCode, property); if (property.ParameterType == PersistenceParameterType.IdentityKey || property.ParameterType == PersistenceParameterType.Key) { _keyPropertiesList.Add(property); } }