Changeset 36512 for lang/csharp
- Timestamp:
- 01/22/10 17:34:09 (3 years ago)
- Location:
- lang/csharp/soyText/soyText
- Files:
-
- 9 modified
-
DocumentSet.cs (modified) (1 diff)
-
DocumentWebServer.cs (modified) (2 diffs)
-
SearchLogSet.cs (modified) (1 diff)
-
bin/Debug/soyText.application (modified) (1 diff)
-
bin/Debug/soyText.exe (modified) (previous)
-
bin/Debug/soyText.exe.manifest (modified) (2 diffs)
-
bin/Debug/soyText.pdb (modified) (previous)
-
bin/Debug/soyText.vshost.application (modified) (1 diff)
-
bin/Debug/soyText.vshost.exe (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
lang/csharp/soyText/soyText/DocumentSet.cs
r36503 r36512 68 68 public DocumentList getRecents() 69 69 { 70 if (cache != null) return cache.getRecents(); 70 71 Debug.syslog("Getrecent called " + (++count) + "times"); 71 if (cache != null) return cache.getRecents();72 72 Debug.print("文書一覧取得中..."); 73 73 //var res = new DocumentList(); -
lang/csharp/soyText/soyText/DocumentWebServer.cs
r36503 r36512 30 30 Debug.syslog(str); 31 31 var s=Regex.Split(str, @"/"); 32 33 32 if (req.RemoteEndPoint.Address.ToString()!="127.0.0.1") 33 { 34 res.StatusCode = 403; 35 Httpd.respondByString(res, "isLocal "+req.IsLocal+" / "+req.RemoteEndPoint.Address); 36 return; 37 } 34 38 if (s[1].ToLower()=="byid" && s.Length>=2) 35 39 { … … 49 53 else 50 54 { 51 var c = new AndCondition(); 55 //var c = new AndCondition(); 56 var cstr = ""; 52 57 for (var i = 1; i < s.Length - 1; i++) 53 58 { 54 c.add(new AttributeCondition("tag",s[i])); 59 if (i>1) cstr += " "; 60 cstr += "tag:" + s[i]; 61 // c.add(new AttributeCondition("tag",s[i])); 55 62 } 56 c.add(new AttributeCondition("name",s[s.Length-1])); 57 var src=documentSet.createDocumentSearcher(c); 58 Document found=null; 59 foreach (var d in src.search()) { 60 found=d; 61 break; 63 var name=s[s.Length - 1]; 64 if (name == "") 65 { 66 search(cstr, res); 62 67 } 63 if (found!=null) { 64 feedDocument(found, res); 65 } else { 66 res.StatusCode = 404; 67 Httpd.respondByString(res, "Not found : "+str); 68 else 69 { 70 var nc = new AttributeCondition("name", name); 71 //c.add(); 72 //var src=documentSet.createDocumentSearcher(c); 73 Document found = null; 74 foreach (var d in documentSet.search(cstr, true)) 75 { 76 if (nc.matches(d)) 77 { 78 found = d; 79 break; 80 } 81 } 82 if (found != null) 83 { 84 feedDocument(found, res); 85 } 86 else 87 { 88 res.StatusCode = 404; 89 Httpd.respondByString(res, "Not found : " + str); 90 } 68 91 } 69 92 } 70 93 }); 71 94 } 95 96 private void search(string cstr, HttpListenerResponse res) 97 { 98 var buf = ""; 99 foreach (var d in documentSet.search(cstr, true)) 100 { 101 buf += "<a href=\"/byid/" + d.id + "\">" + d.ToString() + "</a><br/>\n"; 102 103 } 104 res.ContentType = "text/html; charset=utf-8"; 105 Httpd.respondByString(res, buf); 106 } 72 107 } 73 108 } -
lang/csharp/soyText/soyText/SearchLogSet.cs
r36101 r36512 53 53 d.save(); 54 54 add(d); 55 Debug.syslog("searchLogSet.addOrGet: new " + searchExpr); 55 56 return d; 56 57 } 58 Debug.syslog("searchLogSet.addOrGet: using "+expr2doc[c].id +" for "+ searchExpr); 57 59 return expr2doc[c]; 58 60 } -
lang/csharp/soyText/soyText/bin/Debug/soyText.application
r36503 r36512 12 12 </dsig:Transforms> 13 13 <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 14 <dsig:DigestValue> /HIo/Q3Fs9gZgg2VhJ/f0NTzC0c=</dsig:DigestValue>14 <dsig:DigestValue>MNlBnwvOKvpJMUxLlXER2Q3vpQM=</dsig:DigestValue> 15 15 </hash> 16 16 </dependentAssembly> -
lang/csharp/soyText/soyText/bin/Debug/soyText.exe.manifest
r36503 r36512 113 113 </dependency> 114 114 <dependency> 115 <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="soyText.exe" size="1 19296">115 <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="soyText.exe" size="120320"> 116 116 <assemblyIdentity name="soyText" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> 117 117 <hash> … … 120 120 </dsig:Transforms> 121 121 <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 122 <dsig:DigestValue> YMToFiphbNRH3JvmM9mUijtDw30=</dsig:DigestValue>122 <dsig:DigestValue>Jd6quLTYL9ZUU3sUYExy+6fDENM=</dsig:DigestValue> 123 123 </hash> 124 124 </dependentAssembly> -
lang/csharp/soyText/soyText/bin/Debug/soyText.vshost.application
r36503 r36512 12 12 </dsig:Transforms> 13 13 <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 14 <dsig:DigestValue> /HIo/Q3Fs9gZgg2VhJ/f0NTzC0c=</dsig:DigestValue>14 <dsig:DigestValue>MNlBnwvOKvpJMUxLlXER2Q3vpQM=</dsig:DigestValue> 15 15 </hash> 16 16 </dependentAssembly>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)