예제 #1
0
 public CachePluginAdmin()
 {
     SerializedValues                             = new PersistedConfiguration();
     SerializedValues.diskQuota                   = -1;
     SerializedValues.archiveQuotaPerStream       = -1;
     SerializedValues.reverseProxyRedirectURL     = "";
     SerializedValues.backendServer               = "";
     SerializedValues.enableCaching               = false;
     SerializedValues.enableProxy                 = false;
     SerializedValues.proxyOnDemandCacheMiss      = false;
     SerializedValues.cacheOnDemandCacheMiss      = false;
     SerializedValues.handleUpstreamCacheRequests = false;
     SerializedValues.protocol                    = protocolEnum.clientprotocol;
     RegisteredChangeHandler                      = null;
 }
            FetchNameValFromServerNamespace( "EnableProxy", SerializedValues.enableProxy );
            FetchNameValFromServerNamespace( "HandleUpstreamCacheRequests", SerializedValues.handleUpstreamCacheRequests );
            FetchNameValFromServerNamespace( "PreferredProtocol", SerializedValues.protocol );
            FetchNameValFromServerNamespace( "ProxyOnDemandCacheMiss", SerializedValues.proxyOnDemandCacheMiss );
            FetchNameValFromServerNamespace( "ReverseProxyRedirectURL", SerializedValues.reverseProxyRedirectURL );
        }
    }

    public bool LoadSettingsFromXmlFile( string strPath )
    {
        FileStream fs = null;
        bool bSucceeded = false;
        try
        {
            // A FileStream is needed to read the XML document.
예제 #3
0
 public void RegisterChangeHandler(ModifySettingsEventHandler theHandler)
 {
     RegisteredChangeHandler = theHandler;
 }