I have an droplet on digitalocean which for the most part is working great, however i have enabled the cdn option in digitalocean spaces (similar to aws s3 storage) and in trying to load static files using the cdn url, i cannot seem to get the url working correctly so suspect i am missing the obvious?
For example when i change the STATIC_URL in settings to the cdn no change is seen in the web page source? If i change …
我目前正在使用 PowerShell 学习反射,并且正在努力寻找如何使用反射将参数传递给测试 DLL 中的静态 void 函数,已经研究了几个小时,很可能在 google 或 StackOverflow 上找到了答案?如果这里的大师能帮助我,那就太棒了?
DLL 代码示例:
using System;
using System.Diagnostics;
namespace ExampleProject
{
public class Class1
{
public static void RunProcess(string fullFileName)
{
var p = new Process
{
StartInfo =
{
FileName = fullFileName
}
}.Start();
}
}
}
Run Code Online (Sandbox Code Playgroud)
当前的Powershell代码:
$data = "C:\temp\mytestlib.dll')
$assem = [System.Reflection.Assembly]::Load($data)
$class = $assem.GetType("ExampleProject.Class1")
$method = $class.GetMethod("RunProcess")
$fullName = "C:\\Windows\\System32\\calc.exe"
$method.Invoke($null,$fullName)
Run Code Online (Sandbox Code Playgroud)
收到错误:
Exception calling "Invoke" with "2" argument(s): "Parameter count mismatch."
At line:6 char:1
+ $method.Invoke($null,$fullName)
Run Code Online (Sandbox Code Playgroud)
然而添加 …