Aardvark.Base.Coder.Converter.AreAllResourcesAvailable(string)

Here are the examples of the csharp api class Aardvark.Base.Coder.Converter.AreAllResourcesAvailable(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: aardvark.base
Source File: Converter.cs
View license
public void BuildRoutingTables()
        {
            var keys = m_routingMap.Keys.ToList();

            // clear all entries
            foreach (var key1 in keys)
                foreach (var key2 in keys)
                    m_routingMap[key1][key2] = new RoutingEntry() { Distance = 99999999 };

            var validConversions = (from conversion in m_actionMap.Keys
                                    where AreAllResourcesAvailable(conversion.E0) &&
                                          AreAllResourcesAvailable(conversion.E1)
                                    select conversion).ToList();

            // first add all direct routes
            foreach (Pair<string> conversion in validConversions)
                AddDirectRoute(conversion);

            // now go and find the indirect routes
            foreach (Pair<string> conversion in validConversions)
                UpdateRoutingTable(conversion);

            if (!m_initialized)
                m_initialized = true;
        }

2. Example

Project: aardvark.base
Source File: Converter.cs
View license
public Convertible FindConvertibleByFileName(string fileName)
        {
            var fileExt = Path.GetExtension(fileName).ToLower();

            List<Func<string, Convertible>> creators;
            if (!m_fileExtensionsMap.TryGetValue(fileExt, out creators))
                throw new ArgumentException("no convertible available for this file extension", fileExt);

            foreach (var func in creators)
            {
                Convertible conv = func(fileName);
                if (AreAllResourcesAvailable(conv.Descriptor))
                    return conv;
            }

            throw new ArgumentException("could not find a creator for this file extension", fileExt);
        }