public HelpPage(WebHttpBehavior behavior, ContractDescription description) { this.operationInfoDictionary = new Dictionary<string, OperationHelpInformation>(); this.operationPageCache = new NameValueCache<string>(); this.helpPageCache = new NameValueCache<string>(); foreach (OperationDescription od in description.Operations) { operationInfoDictionary.Add(od.Name, new OperationHelpInformation(behavior, od)); } }
public WebScriptClientGenerator(ServiceEndpoint endpoint, bool debugMode, bool crossDomainScriptAccessEnabled) { this.endpoint = endpoint; this.debugMode = debugMode; // The service host is automatically restarted every time a service or any of its dependencies change // A restart adds all the behaviors from scratch. // => WebScriptEnablingBehavior plugs in this contract for the "/js" endpoint afresh if the service changes. this.serviceLastModified = DateTime.UtcNow; // Zero out all millisecond and sub-millisecond information because RFC1123 doesn't support milliseconds. // => The parsed If-Modified-Since date, against which serviceLastModified will need to be compared, // won't have milliseconds. this.serviceLastModified = new DateTime(this.serviceLastModified.Year, this.serviceLastModified.Month, this.serviceLastModified.Day, this.serviceLastModified.Hour, this.serviceLastModified.Minute, this.serviceLastModified.Second, DateTimeKind.Utc); this.proxyCache = new NameValueCache<string>(); this.crossDomainScriptAccessEnabled = crossDomainScriptAccessEnabled; }
public WebScriptClientGenerator(ServiceEndpoint endpoint, bool debugMode, bool crossDomainScriptAccessEnabled) { this.endpoint = endpoint; this.debugMode = debugMode; // The service host is automatically restarted every time a service or any of its dependencies change // A restart adds all the behaviors from scratch. // => WebScriptEnablingBehavior plugs in this contract for the "/js" endpoint afresh if the service changes. this.serviceLastModified = DateTime.UtcNow; // Zero out all millisecond and sub-millisecond information because RFC1123 doesn't support milliseconds. // => The parsed If-Modified-Since date, against which serviceLastModified will need to be compared, // won't have milliseconds. this.serviceLastModified = new DateTime(this.serviceLastModified.Year, this.serviceLastModified.Month, this.serviceLastModified.Day, this.serviceLastModified.Hour, this.serviceLastModified.Minute, this.serviceLastModified.Second, DateTimeKind.Utc); this.proxyCache = new NameValueCache <string>(); this.crossDomainScriptAccessEnabled = crossDomainScriptAccessEnabled; }