FWatcher.DoRegisterWatcherType C# (CSharp) 메소드

DoRegisterWatcherType() 공개 메소드

public DoRegisterWatcherType ( Type targetType, Type linkType ) : void
targetType Type
linkType Type
리턴 void
    public void DoRegisterWatcherType(Type targetType, Type linkType)
    {
        int watcherTypeCount = _watcherTypes.Count;

        for(int w = 0; w < watcherTypeCount; w++)
        {
            if(_watcherTypes[w].targetType == targetType)
            {
                //we already have a watcher for this type, so remove the old watcher
                _watcherTypes.RemoveAt(w);
                w--;
            }

        }

        FWatcherType newWatcherType = new FWatcherType(targetType, linkType);

        _watcherTypes.Add (newWatcherType);
    }