Fan.Sys.List.ro C# (CSharp) Method

ro() public method

public ro ( ) : List
return List
        public List ro()
        {
            if (m_isReadonly) return this;
              if (m_readonlyList == null)
              {
            List ro = new List(m_of);
            ro.m_values     = m_values;
            ro.m_size       = m_size;
            ro.m_isReadonly = true;
            m_readonlyList  = ro;
              }
              return m_readonlyList;
        }

Usage Example

Example #1
0
 public static List list()
 {
     lock (m_podsByName)
     {
         // TODO - eventually we need a faster way to load
         //  pod meta-data into memory without actually loading
         //  every pod into memory
         if (m_allPodsList == null)
         {
             List names = Env.cur().findAllPodNames();
             List pods  = new List(Sys.PodType);
             for (int i = 0; i < names.sz(); ++i)
             {
                 string name = (string)names.get(i);
                 try
                 {
                     pods.add(doFind(name, true, null));
                 }
                 catch (Exception e)
                 {
                     System.Console.WriteLine("ERROR: Invalid pod file: " + name);
                     Err.dumpStack(e);
                 }
             }
             m_allPodsList = pods.ro();
         }
         return(m_allPodsList);
     }
 }
All Usage Examples Of Fan.Sys.List::ro