コード例 #1
0
        /// <summary>
        /// Creates tags.
        /// </summary>
        /// <param name="sender">Event sender object.</param>
        /// <param name="args">Event arguments.</param>
        public void CreateTags(object sender, BeforeImportEntitiesSaveEventArgs args)
        {
            EntitySchema rootEntitySchema = GetRootEntitySchema(args.RootSchemaUId);

            ImportTags = new List <Entity>();
            foreach (ImportTag importTag in args.ImportTags)
            {
                Entity tag = CreateTag(GetEntitySchemaTagSchemaName(rootEntitySchema.Name), importTag.DisplayValue);
                if (tag != null)
                {
                    ImportTags.Add(tag);
                    tag.Save();
                    SaveTagData(importTag, tag);
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Send message before save entities
 /// </summary>
 /// <param name="eventArgs"></param>
 protected void OnBeforeImportEntitiesSave(BeforeImportEntitiesSaveEventArgs eventArgs)
 {
     BeforeImportEntitiesSave?.Invoke(this, eventArgs);
 }