Beispiel #1
0
        public void MesclarCamposCom(Objeto objeto, bool reordenar = false)
        {
            Campos.AddRange(objeto.Campos);
            if (reordenar)
            {
                Campos.Sort((x, y) => x.Ordem - y.Ordem);
            }

            Ids.AddRange(objeto.Ids);
        }
Beispiel #2
0
            /// <summary> Restore any previously saved values (Ids list) from the EditorPrefs </summary>
            public void RestoreFromEditorPrefs()
            {
                string ids = EditorPrefs.GetString(m_editorPrefsKey, "");    //get all the ids (the first entry is the parent graph asset path)

                if (string.IsNullOrEmpty(ids))
                {
                    return;                                                  //if nothing is there -> return
                }
                string[] idsArray = ids.Split(ScriptUtils.STRING_SEPARATOR); //split the ids
                Ids.Clear();                                                 //clear the current ids list
                GraphAssetPath = idsArray[0];                                //set the graph asset path -> this is the first entry in the string value and it is the parent graph of the copied nodes
                ArrayUtility.RemoveAt(ref idsArray, 0);                      //remove the parent graph as now we want the node ids
                Ids.AddRange(idsArray);                                      //add the saved node ids to the ids list
            }
Beispiel #3
0
        public void AddIds(List <string> id)
        {
            var Ids = GetAllIds();

            if (Ids == null)
            {
                Ids = new List <string>();
            }

            Ids.AddRange(id);

            using (StreamWriter file = File.CreateText(fileName))
            {
                JsonSerializer serializer = new JsonSerializer();
                //serialize object directly into file stream
                serializer.Serialize(file, Ids);
            }
        }
Beispiel #4
0
 public EnvironmentFilter(IEnumerable <int> ids)
 {
     Ids.AddRange(ids);
 }
Beispiel #5
0
 /// <summary>
 /// Sets the Ids value.
 /// </summary>
 /// <param name="ids">A list of the IDs of the objects to retrieve.</param>
 public ApiSearchOptions SetIds(IList <int> ids)
 {
     Ids.AddRange(ids);
     return(this);
 }
Beispiel #6
0
 public ApiSearchOptions(IList <int> ids)
 {
     Ids.AddRange(ids);
 }
 public MessageIdCollection(IEnumerable <string> messageIds)
 {
     Ids.AddRange(messageIds);
 }